Skip to content

Instantly share code, notes, and snippets.

@gkossakowski
Created September 22, 2011 17:07
Show Gist options
  • Save gkossakowski/1235361 to your computer and use it in GitHub Desktop.
Save gkossakowski/1235361 to your computer and use it in GitHub Desktop.
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