-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix #939 #959
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
Merged
Merged
Fix #939 #959
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
It seems to complciate things with no real purpose.
Done in order to keep the basics as simple as possible. Treating existentially bound parameters as still instantiatable type parameters does not seem to add anything fundamental, and makes the type system less regular.
Also: fix adaptArgs and LambdaTrait to make it work.
Also: fix EtaExpansion. Also: Add some debug code to Applications, awaiting further fixes.
typeSymbols always have empty type parameter list.
Previous implementation died because TermRef had no denotation.
Printing bounds omits the "<:" otherwise.
Arg bounds do not count is bindings.
Arg bounds do not count is bindings. Also: TypeLambda's $Apply binding should be covariant, because the parameter is (not sure it matters though).
Taking typeAlias is illegal in that case.
Makes i815 compile.
This prevents propagation changes leading to long recompiles when a printer is changed.
All Lambda abstractions, not just eta expansions, should use actual parameter bounds, not the one retrieved from the parameter symbols.
by bringing homogenization of # $Apply projections back.
Any is a supertype of every other type, so no need to analyze types in detail. This also fixes the cyclic reference error observed for sets.scala, but only for the special case where the base class is Any.
The change in subtyping led to a deep subtype recursion for sets.scala. It seems legit, so the -Yno-deep-subtypes check is disabled.
Describes its meaning more accurately.
It's unclear what the prupose of the previous restriction to Local only was. And we need it to be set for all arg bindings so that immutable.Set does not fail with a variance error.
Allows us to compile immutable.Set.
When following an alias type, go directly to aliased type. Going via the TypeAlias link causes the current variance ot be narrowed to 0.
After changes to variance checker and fixes to stdlib.
If a partial application of a function has an error type, make sure the whole tree also has an error type. Before, sometimes the type was missing which led to a partial application error.
…ftype Analogous to the previous situation where we do not report a data race if the previous symbol comes from a superclass, we now do the same if the previous symbol comes from a given self type. Makes overrideDataRace.scala pass, and finally enables stdlib test with TraverableViewLike.scala added.
(1) Also allow symbols to switch between a member of a class and a member of its selftype. Seen in the wild in TraversableViewLike.scala. Test case in pickling/selfSym.scala (2) Tidy up the error message.
ParamForwarding converts some parameters to nullary methods, yet it does not update the references to these parameters. Their signature is still NotAMethod, which is wrong. Causes subtle differences in peckle tests: a param accessor get type T before pickling (which is wrong), gets => T when reading back (which is right). Test case in pickling/selfSym.scala.
This is needed to ensure that the type of a definition node (ValDef, TypeDef, or DefDef) always refers to the symbol of that definition. Caused a spurious error in selfReq to go away (so error count was updated).
We do not allow same-named class members in supertraits of a mixin composition anymore. This commit gives a better error message and avoids a crash in RefChecks.
`super` has no meaning for type membes. Harmonizing the prefix to `this` avoids spurious incompatibilities.
A SuperType should behave just as the underlying ThisType in asSeenFrom. Without this patch, compiling the ...ViewLike hierarachy crashes with a YCheck error in resolveSuper. The underlying issue is that the very complicated tangle of supercalls does not type check because an asSeenFrom with a SuperType prefix does not compute the right type.
We now get a cyclic reference when inheriting from an inner class with the same name in an outer supertype. Since this was legal in Scala2 it's good to explain that particular case. Test case in overrideClass.scala
Otherwise we'd get a failure due to an overloaded `get` definition whenever we typecheck a case class that is also a Map (because maps inherit a `get`).
Generalize overriding checking from isDefined to all methods added by desugar to a case class. None of these methods has an override so we need to add one in case they do override another method (previously we would flag this as an error).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix pattern matching unapply patterns where a baseclass defines
get
. IntMaps.scala now dies in the backend witherror: Unexpected tree in genLoad: TypeTree[TypeRef(ThisType(TypeRef(ThisType(TypeRef(NoPrefix,immutable)),IntMap$)),Nil$)]/class dotty.tools.dotc.ast.Trees$TypeTree at: <2595..2606>
a)bort, s)tack, r)esume: a
java.lang.Exception
at dotty.tools.dotc.reporting.ConsoleReporter.displayPrompt(ConsoleReporter.scala:64)
at dotty.tools.dotc.reporting.ConsoleReporter.doReport(ConsoleReporter.scala:48)
at dotty.tools.dotc.reporting.Reporter.report(Reporter.scala:232)
at dotty.tools.dotc.reporting.Reporting$class.error(Reporter.scala:106)
at dotty.tools.dotc.core.Contexts$Context.error(Contexts.scala:53)
at dotty.tools.backend.jvm.DottyBackendInterface.abort(DottyBackendInterface.scala:380)
at scala.tools.nsc.backend.jvm.BCodeBodyBuilder$PlainBodyBuilder.genLoad(BCodeBodyBuilder.scala:431)
at scala.tools.nsc.backend.jvm.BCodeBodyBuilder$PlainBodyBuilder.genEqEqPrimitive(BCodeBodyBuilder.scala:1349)
at scala.tools.nsc.backend.jvm.BCodeBodyBuilder$PlainBodyBuilder.genCond(BCodeBodyBuilder.scala:1290)
at scala.tools.nsc.backend.jvm.BCodeBodyBuilder$PlainBodyBuilder.genZandOrZor$1(BCodeBodyBuilder.scala:1274)
at scala.tools.nsc.backend.jvm.BCodeBodyBuilder$PlainBodyBuilder.genCond(BCodeBodyBuilder.scala:1284)
at scala.tools.nsc.backend.jvm.BCodeBodyBuilder$PlainBodyBuilder.genLoadIf(BCodeBodyBuilder.scala:209)
at scala.tools.nsc.backend.jvm.BCodeBodyBuilder$PlainBodyBuilder.genLoad(BCodeBodyBuilder.scala:300)
at scala.tools.nsc.backend.jvm.BCodeBodyBuilder$PlainBodyBuilder.scala$tools$nsc$backend$jvm$BCodeBodyBuilder$PlainBodyBuilder$$genLabelDef(BCodeBodyBuilder.scala:534)
@DarkDimius can you take this over?