-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix #241 #1000
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
Fix #241 #1000
Conversation
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.
Seems to be a hk-type inference issue. Needs further investigation but is not high priority right now.
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).
Without the fix and the later commit that checks types for overriding we get a Ycheck failure in t3452h.scala.
Closes scala#241 -- that took a while!
OK, I'm not exactly sure what the proper fix is but:
Since we don't allow class overriding in Dotty I think we can just bypass the Alternatively, we could change the owner of the denot returned by |
In general we can't prevent the recomputation of the denotation without On Mon, Dec 14, 2015 at 10:45 PM, Guillaume Martres <
Martin Odersky |
OK, so why can't we always call |
Symbolic refs go stale on reload. On Tue, Dec 15, 2015 at 12:58 AM, Guillaume Martres <
Martin Odersky |
LGTM, I think I get it, but:
I think that case d: SymDenotation =>
if (this.isInstanceOf[WithFixedSym]) d.current
else if (d.validFor.runId == ctx.runId || ctx.stillValid(d))
if (d.exists && prefix.isTightPrefix(d.owner) || d.isConstructor) d.current
else recomputeMember(d) // symbol could have been overridden, recompute membership
else {
val newd = loadDenot
if (newd.exists) newd else d.staleSymbolError
} So just disabling the |
(I said LGTM but the |
This is needed to freeze the constraint.
Is it OK with people if we merge the whole PR? At this stage everything before the PR feels very outdated, and I would not want to base anything on it. |
Fine with me. |
Finally works now. Note that this needs the previous fixes to go in as well. Only two commits are new here. I tried on master, but this caused many errors which go away when using branch fix-#939.
Review by @smarter or @samuelgruetter (only last two commits).