| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
Alt/instantiation checks (2)
|
| |
| |
| |
| |
| |
| | |
- Abstract classes cannot be instantiated (exceptions:
parent news and Java annotations)
- Instantiateed class must conform to its self type.
|
| |
| |
| |
| | |
Check that the self type of a class conforms to the self types of its parent classes.
|
|\ \
| | |
| | | |
Partest for Dotty with pos tests and neg tests with error count
|
| |/ |
|
| |
| |
| |
| |
| | |
Idents of lifted symbols become class members, need to carry the right
reference with the right prefix as type.
|
|/
|
|
|
|
|
| |
Documentation around markFree and narrowLiftedOwner was added.
i480 was minimzed and dependencies on dotc were removed. (+1 squashed commit)
Squashed commits:
[1a84054] Test cases for #480
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| | |
Fix isNullableClass to also work after Erasure
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Incidentally this means that:
val d = null.asInstanceOf[Double]
is now correctly transformed to:
val d = scala.Double.unbox(null)
Previously it was translated to:
val d = null: Double
Which is wrong and fails in the backend.
|
|\ \
| | |
| | | |
New phase: trait constructors
|
| |/ |
|
|/
|
|
| |
enclosingMethod should not crash on NoDenotation.
|
|
|
|
|
|
|
|
| |
Move pickling tests into separate top-level test directory.
That way they are not needlessly pos-tested before.
Also, disable core tests for now - after rebasing we get a stale symbol error.
Need to investigate that.
|
|
|
|
|
|
|
|
|
| |
Shadowed names in types need to be pickled and treated on
unpickling.
We choose to make Shadowed a separate TastyName class, to avoid
the ad-hoc name-mangling in current dotc. When names are redone
Shadowed will also become a special class in the compiler proper.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Out-of scope references are evil but do arise. Dotc currently produces them
in two cases (t1957.scala and Typer.scala) because it does not correctly
hygenize dependent methods used as closurs. I beleive scalac wil generate them
in more instances.
The changes can produce dependent method types used in closures. Essentially the
problem was that the depndency was not recognized in Typers when the closure
was first created, because it badly interfered with type inference. But when unpickling
the same closure the dependency is recognized. It's too late to fail now, we better
deal with this gracefully. That's why there is now a mode bit "AllowDependentFunctions"
which should be turned on only for unpickling, which reconstitutes dependent functions
as closures without complaining.
|
|
|
|
| |
Both some long overdue pos tests and more pickleOK tests
|
| |
|
|
|
|
|
|
|
|
|
|
| |
ElimLocals becomes a slightly less trivial transform: NormalizeFlags.
It also computes PureInterface flag, thus relieving Namer and Unpickler
from doing the same in two different ways. Besides, the computation in
Namer/TreeInfo was flawed because it did not take into account that
nested non-static classes are not allowed in an interface (only static
classes are, but these would not be members of the interface in the Scala
sense).
|
|
|
|
|
|
|
|
| |
Also: Make Pickler a plain phase; it is neither a macro transformer nor
a miniphase.
Add tests to pickleOK that are known to be stable under pickling/unpicking
by comparing tree representations via show.
|
|
|
|
|
|
|
|
| |
We have two unhygienic closures left - one in t1957.scala the other in Typer.scala.
This commit leaves some printlns that can be uncommented to get more info on these.
It would be better to fix them but I am running out of time to do so. Maybe someone
else can pick up with the info this commit allows to recover. To find out more,
go to t1957.scala and read the comment.
|
|
|
|
|
| |
We now make sure that a closure's result type does avoid
references to parameter types.
|
|
|
|
|
|
|
|
|
|
| |
The previous scheme generated too many newGenericArray expressions because
at the time newArray was called, the type arguments were not yet determined.
Furthermore, the type variables somehow did not have the right positions,
which caused them not to be interpolated and led to orphan PolyParams.
The new scheme converts the expression when the length parameter has been supplied
and it fully determines the array type before converting.
|
|
|
|
|
|
|
|
| |
We planned this for a long time but never implemented it. Instead, we sometimes
issued an erro in Splitter, namely if reflection would have been needed to access the
member. It turns out that some tests (e.g. neg/t625) fail -Ycheck (we knew that before
and disabled) but also fail Pickling because they generate orhpan PolyParams. So rather
than patching this up it seems now is a good time to enforce the restriction for real.
|
|\
| |
| | |
Fixes to erasure, backend, flatten, restorescopes,
|
| |
| |
| |
| |
| | |
Erasure inserts boxing and unboxing of label returned values, ignoring the fact that some labels do not return.
Now this is taken into account also inside labels which refer labels themselves
|
|\ \
| | |
| | | |
Fix #400
|
| |/
| |
| |
| | |
In a call-by-name arg, replace () => f.apply() with f only if f is pure.
|
|\ \
| | |
| | | |
New test for valueclasses
|
| |/
| |
| |
| |
| |
| | |
Re-instantiated t2667.scala, which failed before because of issue #390.
Also changed order of tests in isDerivedValueClass, to make more disriminating test come first.
|
|/
|
|
|
|
|
|
|
|
|
| |
Add -strict option to do some type checks that are encessary to ensure type soundness, but
are stricter than what Scala 2.x enforces.
The first such test is the "pattern cannot be uniquely instantiated" problem where we reject a
non-variant case subclass of a covariant superclass in a pattern match. The error is now only
issued in -struct mode, otherwise it will be a warning.
We might move more tests into the same category. This should help the transition.
|
|\
| |
| | |
FullParameterization: fix rewiring of Returns
|
| |
| |
| |
| |
| | |
The `from` field of a Return tree should either be EmptyTree or an Ident
corresponding to the method we're returning from.
|
|/
|
|
|
|
|
|
|
|
|
| |
Previously,
type Map = HashMap[Int, String]
new Map
did not work. See test aliasNew.scala for a test.
Formerly this logic handled in Parsers (wrapNew),
but that one does not work for aliastypes.
|
|
|
|
| |
val param
|
|\
| |
| | |
Fix/erasure lub alternative
|
| |
| |
| |
| | |
... of an If, Match, or Try. Fixes #355.
|
|\ \
| | |
| | | |
Backend discovered issues
|
| | |
| | |
| | |
| | | |
java.util.Vector(requested by backend)
|
| |/
| |
| |
| | |
This info transformation was left untriggered before backend was enabled.
|
| | |
|
|/
|
|
|
|
|
|
|
|
| |
Fixes two bugs needed for java-override test:
Namer was creating a MethodType instead of a JavaMethodType even though
the JavaDefined flag was set on the DefDef.
Following Scalac, Namer needs to convert Java method parameters
of type j.l.Object to s.Any.
|
|
|
|
| |
As noticed by @retronym, Any and Object are not identified when matching Scala and Java methods. I believe this is because the Java method does not have the Java flag set. @olhotak can you take a look?
|
| |
|
|
|
|
|
| |
Reformulated matchign spec and implemented accordingly. Previous
fix for #329 would have missed third new error case in over.scala.
|