-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fixes for various txxxx tickets #86
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
Conversation
Please not that first two commits are already effectively merged into master, but with different sha1(changed during rebase) |
Yes, I had lots of merge conflicts when I pulled from master. Maybe that's because of this. |
I will remove these two commits (they undo each other) |
That's all for me. |
Otherwise LGTM for me. I will update the commits. |
Updated commits according to comments. IMHO we can merge this as soon as CI passes. |
Yep, except that apparently GitHub can't merge it automatically ... Rebase on top of master? |
Aarrrgh... Is there I way I can see that? Will rebase |
Test t0288 moved to disabled due to lack of Java interop. Test t0273 fixed by relaxing double def condition: We only regard two definitions that define the same name and have exactly the same signature as double definitions. Previously, signatures that defined the same parameters were also excluded.
Two fixes were needed 1) When typing a function value (x1: T1, ..., xN: Tn) => e, don't unconditionally issue an error if the expected function type arity is different from N. Instead, issue an error only if one of the types T1, ..., Tn is absent. The idea is that only then we need to consult the expected type for the parameter type. This allows to fix the problem later by an implicit conversion applied to the function value. 2) When eta-expanding, do not automtically take the arity of the expected function value as the arity of the generated lambda. Instead, take the method's arity, and copy method parameters into the lambda in case the arities are different.
_root_ is now entered into an enclosing context.
A debug assertion in implicitSearch gave a false alarm and was removed.
Added more tests which all pass, except for tests in disabled and pending. t0694 went from pos to neg, because the kind of alias type used in t0695 is no longer supported.
Previously, only implicit method types were eligible as views. This is too strict, as it rules out view bounds. We now also consider types that derive from Function1. The reason for not allowing any type is that this would cause us to check many more types for applicability when an implicit view is searched.
Was previously wrapped in a package <empty> but the resulting tree had no position, which caused a Typer assertion. If now represented as EmptyTree.
which all pass.
Method type comparison via <:< yielded false if the signatures of the two method types differed. This is too strict, because methods can have the same parametyers but different result types and still be in a subtype relationship. We now onyl demand that the sighatures have the same parameters.
type T was not recorgnized as a SAM type because a case was missing in zeroParamClass.
Needed an extra case in isSubType.
Need to do unit discarding also in selection prototypes.
The original test is now in error because the type Meta in the prefix Meta#Event is not stable and contains an abstract member Slog. Even after removing Slog, the test in pos was still in error because the bound type parameters were incorrectly recognized as abstract members. This has been fixed by the changes to Types.
The type of self name "x" was taken to be the thisType of the current owner. But the current owner was a local dummy of the class in question, so the ThisType was NoPrefix. Inserting an enclosingClass fixes the problem.
(and also of t0625, which reappeared). Several fixes were made. In summary: 1. Naming and representation of KigherKinded traits changed. It's now $HigherKinded$NIP where the letters after the second $ indicate variance (N)egative, (I)nvariant, (P)ositive. The HKtraits themselves are always non-variant in their parameters. 2. When deriving refined types over higher-kinded types, the variance of a type alias is the variance of the new type constructor. 3. isSubTypeHK was changed, as was the position from where it is called. 4. appliedTo also works for PolyTypes.
Mostly Java interop tests which are not yet supported. The test infrastructure for Java ocmpilation and the java parser from Scala are still missing.
Turned parameter into receiver (reciever was not used before at all).
baseTypeWithArgs now also keeps track of refinements in the subtypes. Without that, the approximated lub in t1279a is too coarse and the program fails to typecheck.
test case t0273. Was positive in Scala 2, is now deemed to be negative. Two two definitions def a = () => () def a[T] = (p:A) => () do have matching signatures, so should constitute a double definition. I previously thought that we can get away if the two definitions have different result types, but then you immediately have a problem because the denotations have matching signatures for the pruposes of "&" yet cannot be merged. Which of the two definitions would override a definition in a base class is then an arbitrary decision.
stripImplicits needs to take polytypes into account.
Rebased. |
And now travis failed ... |
@odersky this is caused by the rebase itself and is an incompatibility between the changes with #88. The tips before my rebases are as follows:
The diff between the tips before the rebase on master is trivial (gzm0/dotty@4d7ee1d ... gzm0/dotty@0e6a79e)
|
Fix of d6df293. It turned out the original commit was faulty in that iterator.flatten did not typecheck. The problem is fixed in this commit and flatten is added to the collections test.
Should be OK now. Over to @gzm0 |
LGTM @sjrd? |
LGTM |
Backport "fix: don't consider `into` as a soft-modifier" to 3.3 LTS
No description provided.