Created
September 21, 2011 16:29
-
-
Save jorgeortiz85/1232550 to your computer and use it in GitHub Desktop.
Revisions
-
jorgeortiz85 revised this gist
Sep 21, 2011 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,7 +7,7 @@ object Main { def fetch[A](id: Int @ FK[A]): A = null.asInstanceOf[A] def main(args: Array[String]): Unit = { val id: Int @ FK[Checkin] = 10 // Why does this type check? fetch[User](id) -
jorgeortiz85 created this gist
Sep 21, 2011 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ class FK[A] extends StaticAnnotation class User class Checkin object Main { def fetch[A](id: Int @ FK[A]): A = null.asInstanceOf[A] def main(args: Array[String]): Unit = { val id: Int @ FK[Venue] = 10 // Why does this type check? fetch[User](id) } }