Created
September 22, 2011 14:49
-
-
Save gkossakowski/1234963 to your computer and use it in GitHub Desktop.
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 characters
object Test extends EmbeddedControls { | |
case class MyRow(args: List[(String, Any)]) extends Row[Rep] | |
override def __new[T](args: (String, Any)*): T = MyRow(args.toList).asInstanceOf[T] | |
trait Rep[x] | |
val foo: Rep[Row[Rep] { val xx: Int; val yy: String }] = (new Row[Rep] { val xx = 23; val yy = "y" }).asInstanceOf[Rep[Row[Rep] { val xx: Int; val yy: String }]] | |
} | |
println(Test.foo.xx) | |
//compiler error: | |
[error] /Users/grek/scala/lms-sandbox/src/Main.scala:158: value xx is not a member of Main.Test.Rep[Main.Test.Row[Main.Test.Rep]{val xx: Int; val yy: String}] | |
[error] println(Test.foo.xx) | |
[error] ^ | |
[error] one error found |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment