You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
scala>vala=Array[{defx:Int}](new { defx=3 })
<console>:7:error: typemismatch;
found : scala.reflect.Manifest[java.lang.Object]
required: scala.reflect.ClassManifest[AnyRef{defx:Int}]
Note: java.lang.Object>:AnyRef{defx:Int}, but traitClassManifest is invariant in typeT.
You may wish to investigate a wildcard typesuch as `_ >: AnyRef{def x: Int}`. (SLS3.2.10)
vala=Array[{defx:Int}](new { defx=3 })
@xeno-by said:
Scala 2.10.0-M3 includes type tags (which may be renamed by the time 2.10.0-final hits). Type tags are thin wrappers over compiler's Types, which means that they support all intricacies of Scala's type system.
Welcome to Scala version 2.10.0-20120527-185059-965b03e100 (JavaHotSpot(TM) 64-BitServerVM, Java1.6.0_25).
Type in expressions to have them evaluated.
Type:help for more information.
scala> typeOf[{ defx:Int }]
res0: reflect.runtime.universe.Type= java.lang.Object{defx: scala.Int}
Type tags are now a recommended way to reify types, and manifests are deprecated. Hence we won't implement any new functionality for manifests.
[Edit: replaced original report with more distilled illustration.]
The text was updated successfully, but these errors were encountered: