-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Transform/erasure #101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Transform/erasure #101
Conversation
@DarkDimius @gzm0 please review. Also, it would be good to get this in before the with->set renaming, or else we need to take special care with 64868aa |
OK, I see #100 fixes the problem already, so it can go in first. |
@DarkDimius No this is the Typer phase. Only its erasure derivation cannot see imports anymore. |
Can we merge this now? I have a large number of commits waiting that depend on it. |
Now works for all combinations of java/scala sue ErasedValueClass/go directly to underlying type constructors/others wildcards ok/not Signatures had to be refined as well, because the signature depends on whether a type comes form Java or Scala (handling of intersections is different). Also, replaced splitArray method in TypeApplication by extractors for single- and multi-dimensional array types in definitions.
To be executed before erasure.
New method ensureApplied which will add a () parameter list if a tree's widened type takes parameters. Used in numericConversion, so that we are independent whether we run before () insertion or after. With that change TypeTestCasts can stay enabled for the whole build. Conflicts: src/dotty/tools/dotc/ast/tpd.scala
Added general way to produce summaries when shwowing trees or types. Summaries have limited, configrable recusion depth. fix showSummary
Still missing: bridge method generation, signatures. Other changes - Turned around Checking and NoChecking. Checking is the default, NoChecking disables it. - Refactored Typer#typed to expose typedNamed, so that it can be overridden in erasure. - Made logging more forgiving wrt off-buy-one phase errors. Conflicts: src/dotty/tools/dotc/typer/Typer.scala
Squash was accidenbtally turned off before. Is now on again.
Run now interprets correctly -YstopBefore -YstopAfter -Yskip -Tprint phase settings. For now, we stop by default before erasure, until erasure is fully debugged.
Various fixes to the tree transformer. In the denotation transformer we now keep self types around because otherwise sourceModule would stop to work. Conflicts: src/dotty/tools/dotc/core/transform/Erasure.scala
LGTM |
First working version of erasure.
Well it works for one file (tests/pos/erasure.scala).
To test erasure, you need to use
-YstopBefore terminal
Otherwise it will stop before it comes to the phase.