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
The following code puts the compiler into an infinite loop possibly because of a DivergentImplicitTypeError (Not completely sure it is infinite but I gave it a solid 20 minutes before I killed it):
error: type mismatch;
found : ScalaFiddle.this.Property[scala.this.Nothing]
required: ScalaFiddle.this.Property[scala.this.Int]
Note: scala.this.Nothing <: scala.this.Int, but class Property is invariant in type T.
You may wish to define T as +T instead. (SLS 4.5)
Error occurred in an application involving default arguments.
val x = Dummy[Int]()
^
This unexpected behaviour is actually a part of the spec: The default argument expression e is type-checked with an expected type T' obtained by replacing all occurrences of the function's type parameters in T by the undefined type
and in case of these implicits leads to huge mess in implicit resolution. More details: scala/scala-dev#366 (comment)
Anyway, I've managed to reduce the number of implicit defs and macro usage to the point where detecting the issue is acceptably fast and covered by our test suite. #276
The following code puts the compiler into an infinite loop possibly because of a DivergentImplicitTypeError (Not completely sure it is infinite but I gave it a solid 20 minutes before I killed it):
If I change
SeqProperty.blank
toSeqProperty.blank[T]
it will throw an error saying it cannot find a implicit ProperyCreator[T] as it should.The text was updated successfully, but these errors were encountered: