| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
Fix/#305 annot bootstrap
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
1) Rename `decls` to `unforcedDecls` to make it clear that
it is danegrous to use.
2) Prefer `info.decls` over `unforcedDecls`.
This fixes the problem reported in #305 where the primary
constructor was not found.
|
| | |
|
| | |
|
|\ \
| |/
|/| |
Fixed #264 - failure to typecheck GADTs
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The previous scheme derived the right bounds, but then failed to use them
because a TypeRef already has a set info (its bounds). Changing the bounds in
the symbol by a side effect does not affect that. This is good! But it showed
that the previous scheme was too fragile because it used a sneaky side effect
when updating the symbol info which failed to propgate into the cached
info in TypeRef.
We now keep GADT computed bounds separate form the symbol info
in a map `gadt` in the current context.
|
|\ \
| | |
| | | |
Shared backend
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
|\ \ \
| |/ /
|/| | |
Fix #239 - handling of package objects
|
| | |
| | |
| | |
| | |
| | | |
Like TypeAssigner, asSeenFrom needs to insert a package object if the
prefix is a package but the class enclosing the type is not.
|
| | |
| | |
| | |
| | |
| | |
| | | |
References to `.package` are now also inserted if the
accessed member comes from a class inherited by a package
object.
|
| |/
|/| |
|
|/
|
|
|
| |
1) Verify we survive illegal infinite paths. Closes #91.
2) Verify we handle fbounds in and types correctly.
|
| |
|
|
|
|
|
|
| |
Now: All new Array[T] methods are translated to calls of the form
dotty.Arrays.newXYZArray ...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, a double definition errorfor `T` was produced in a case like this:
type T1 = C { T <: A }
type T2 = T1 { T <: B }
This was caused by the way T1 was treated in the refinement class
that is used to typecheck the type. Desugaring of T2 with `refinedTypeToClass`
would give
trait <refinement> extends T1 { type T <: B }
and `normalizeToClassRefs` would transform this to:
trait <refinement> extends C { type T <: A; type T <: B }
Hence the double definition. The new scheme desugars the rhs of `T2` to:
trait <refinement> extends C { this: T1 => type T <: B }
which avoids the problem.
Also, added tests that #232 (fix/boundsPropagation) indeed considers all refinements
together when comparing refined types.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Turns out that the last commit was a red herring. None of the hoops
it jumped though was necessary. Instead there was a bug in isRef
which caused `&` to erroneously compute T & Int as Int.
The bug was that we always approximated alias types by their high bound. But
in the present case, this leads to errors because U gets 'bounds >: Nothing <: Any',
but it was still an alias type (i.e. its Deferred flag is not set). The fix
dereferences aliases only if their info is a TypeAlias.
|
|
|
|
|
| |
We used to approximate these by their bounds, but this is confusing.
See comment in printbounds.scala.
|
|
|
|
|
| |
Need to account for the fact that some argument types may be TypeBoudns themselves.
The change makes Jason's latest example work.
|
|
|
|
|
|
|
| |
We need to adapt type parameter bounds with an as-ssen-from to the
prefix of the type constructor.
Makes pos/boundspropagation pass.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Annotations in java could be compiled as-if array-only
annotation had <repeated> arguments constructor.
That isn't true for scala.
Also, type checking creation of single-element array
requires implicit resolution to provide ClassTag.
This makes problems while reading deferred annotation.
|
| |
|
| |
|
|
|
|
| |
These tests work correctly since 222e9a478f7b851582550973df6a9d141766e49a
|
|\
| |
| | |
Fix/overriding
|
| |
| |
| |
| |
| |
| |
| |
| | |
OverridingPairs had several bugs which caused pairs to be lost, which caused
missing overrides checks. Fixing OverridingPairs revealed several test failures
(and a problem in Synthetics generation which was fixed in the last commit).
Tests that became negative are all moved into neg/overrides.scala, and the
original versions in pos were fixed.
|
|\ \
| | |
| | | |
Try to avoid overconstraining when comparing and/or types
|
| | | |
|
| | | |
|
| |/
| |
| |
| |
| | |
See comments in eitherIsSubType for an explanation what the
problem is. Some test cases are in subtyping.scala
|
|/
|
|
|
|
|
| |
One test (t2613) required lifting a hard recursion limit in findMember
(used for debug only, will be removed in the future). The same test
also requires -Yno-deep-subtypes to be reset, so it's in pos_special
instead of pos.
|
|
|
|
|
| |
Need to account for the possibility that function
arguments are wrapped in braces.
|
| |
|
| |
|
|
|
|
|
| |
Now also handles all supercalls. Seems to do the right thing on pos/traits.scala.
But does not pass most tests because the sym transformer forces too many things.
|
|
|
|
|
| |
Make private methods in traits static, so that we do not need
to give a default for them.
|
|\ |
|
| | |
|
| | |
|
|/ |
|
|
|
|
|
| |
Nested methods cannot refer to labels in theior environment. Needs a fix in TailCalls.
Moved failing test to pending.
|
|
|
|
|
|
|
|
|
|
|
|
| |
The patch disables hoisting of classes local to a block into the
result type of the block.
Instead, we widen the result type of the block to one which reflects
all refinements made to the parents type of the local class.
Test cases in avoid.scala, t1569.scala.
The original t1569.scala no longer works. Why is explained in neg/t1569-failedAvoid.scala
|
| |
|
| |
|
| |
|