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
$ cat target/union.scala
objecta {
valx:String|Int='a
}
$ time ./bin/dotc target/union.scala
-- [E007] TypeMismatchError: target/union.scala ------------------------------2|valx:String|Int='a|^^|found: Symbol|required: String|Int|
one error found
./bin/dotc target/union.scala 30.37s user 1.44s system 262% cpu 12.094 total
I ran jprofiler on a repl session to see what was happening and got these results union-typeerror.zip
I don't know much about Dotty's typer to make sense of the report.
My understanding from @DarkDimius's comment on Gitter is that union types put a strain on the type-checker for several fundamental reasons. However, 12s to report a type-error on a minimal example sounds like a bug to me.
The text was updated successfully, but these errors were encountered:
It's a diverging implicit search involving Any2ArrowAssoc and Ensuring and other fundamental Predef decorators. They should not try to form nested implicit conversions but for some reason they do. I have to find out why.
To reproduce, running from commit db24246
I ran jprofiler on a repl session to see what was happening and got these results
union-typeerror.zip
I don't know much about Dotty's typer to make sense of the report.
My understanding from @DarkDimius's comment on Gitter is that union types put a strain on the type-checker for several fundamental reasons. However, 12s to report a type-error on a minimal example sounds like a bug to me.
The text was updated successfully, but these errors were encountered: