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
<console>:4:error: typemismatch;
found : Bar.type(in object$$iw) where typeBar.type(in object$$iw) <:BarwithSingletonrequired: Bar.type(in value res0) forSome { typeBar.type(in value res0) <:Bar(in value res0) withSingleton; typeBar(in value res0) <: java.lang.ObjectwithScalaObject }
valres0=
@SethTisue said:
any chance of this bug getting some attention? there are a lot of ways to trigger this: see also #1195, #4171, plus this one (very similar to #4171) I found today:
scala> { class A; class B extends A; classOf[B] }
<console>:7: error: type mismatch;
found : java.lang.Class[B(in value res4)] where type B(in value res4) <: A with ScalaObject
required: java.lang.Class[_ <: A with ScalaObject]
val res4 =
^
In 2.7.1 final
causes type error
Whereas the somewhat similar code
results in
The first example should probably result in a ScalaObject with Singleton or similar. And, in fact, explicitly typing the block solves the problem
The text was updated successfully, but these errors were encountered: