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
e3 is the only definition that triggered the following error:
Found: Int => String
Required: com.tribbloids.spike.dotty.ProductSAM.Example
Explanation
===========
Tree: {
def $anonfun(v: Int): String =
{
v.toString()
}
closure($anonfun)
}
I tried to show that
Int => String
conforms to
com.tribbloids.spike.dotty.ProductSAM.Example
but none of the attempts shown below succeeded:
==> Int => String <: com.tribbloids.spike.dotty.ProductSAM.Example class dotty.tools.dotc.core.Types$CachedAppliedType class dotty.tools.dotc.core.Types$CachedTypeRef = false
The tests were made under the empty constraint
val e2: Example = { (v: Int) =>
Expectation
the definition of e3 should work with both Scala 2/3 syntax (right now it breaks in both)
The text was updated successfully, but these errors were encountered:
Compiler version
3.5.1
Minimized code
In the following code,
e1, e2, e3
should be equivalentOutput
e3 is the only definition that triggered the following error:
Expectation
the definition of e3 should work with both Scala 2/3 syntax (right now it breaks in both)
The text was updated successfully, but these errors were encountered: