Created
September 22, 2011 17:07
-
-
Save gkossakowski/1235361 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 { | |
trait Row[+Rep[x]] | |
// case class MyRow(args: List[(String, Any)]) extends Row[Rep] { | |
// | |
// } | |
// class ApplyDynamicOps { | |
// def applyDynamic[T](n: String)(as: AnyRef*): Rep[T] = error(n + as.mkString("(", ",", ")")) | |
// } | |
// implicit def applyDynamicOps[T <: MyRow](qual: Rep[T]): ApplyDynamicOps = new ApplyDynamicOps | |
// override def __new[T](args: (String, Any)*): T = MyRow(args.toList).asInstanceOf[T] | |
trait Rep2[x] | |
val foo: Row[Rep2] { val xx: Int; val yy: String } = new Row[Rep2] { val xx = 23; val yy = "y" } // : Rep[Row[Rep] { val xx: Int; val yy: String }] //.asInstanceOf[Rep[Row[Rep] { val xx: Int; val yy: String }]] | |
val xx = foo.xx | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment