trait
Struct extends AnyRef
Value Members
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
-
def
->[B](y: B): (Struct, B)
-
final
def
==(arg0: Any): Boolean
-
final
def
asInstanceOf[T0]: T0
-
def
clone(): AnyRef
-
def
ensuring(cond: (Struct) ⇒ Boolean, msg: ⇒ Any): Struct
-
-
def
ensuring(cond: Boolean, msg: ⇒ Any): Struct
-
-
-
def
equals(arg0: Any): Boolean
-
def
finalize(): Unit
-
def
formatted(fmtstr: String): String
-
final
def
getClass(): Class[_]
-
def
hashCode(): Int
-
final
def
isInstanceOf[T0]: Boolean
-
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
-
def
→[B](y: B): (Struct, B)
Struct is a marker trait used to indicate that
new C { ... }
should be reified.Selections on the result
e
of the reified object creation,e.x_i
, are treated specially, as outlined below.If there's a type constructor
Rep
(of kind* -> *
) so thatC <:< Struct
, the expressionnew C { (val x_i: T_i = v_i)* }
is turned into the callnew(("x_i", (self_i: Rep[C{ (val x_i: T_i')* }]) => v_i')*)
, which is typed with expected type
Rep[C{ (val x_i: T_i')* }]For all i,
this
by a fresh variableself_i
(with typeRep[C{ (val x_i: T_i')* }]
)This assumes there is a method in scope similar to:
def new[T](args: (String, Rep[T] => Rep[_])*): Rep[T]
When a selection
e.x_i
does not type check according to the normal typing rules, ande
has typeRep[C{ (val x_i: T_i')* }]
(whereC
meets the criteria outlined above),e.x_i
is turned intoe.selectDynamic[T_i]("x_i")