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>traitTmpT { typeA; typeB; typeAorB=A|B ; deffromA(a: A):AorB= a; deffromB(b: B):AorB= b }
// defined trait TmpT
scala>objectTmpOextendsTmpT{ typeA=7; typeB=8 }
// defined object TmpO
scala>valx:TmpO.AorB=TmpO.fromA(7)
1|valx:TmpO.AorB=TmpO.fromA(7)
|^|no implicit argument of typedotty.Show[TmpO.AorB] was found for parameter ev of method show in classShowValue.
|Ifound:
|| dotty.Show.defaultShow[Nothing]
||But method defaultShow in traitLowPrioShow does not matchtypedotty.Show[TmpO.AorB].
union of singleton types are not supported currently
But the repl shouldn't give confusing errors like this
For 2, I guess it should explain why it's searching for a Show instance, since that's not something the user explicitly asked for. Probably prepend the error with something like "error while trying to display result".
Uh oh!
There was an error while loading. Please reload this page.
Note that one can fix it using this line:
The text was updated successfully, but these errors were encountered: