| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
When reading external symbols from class Object, need to consider
members of Any as well.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This causes backend to fail with ambiguous reference when loading
member "equals" of object "BoxesRuntime".
The reference is indeed ambiguous. BoxesRunTime has a two paremeter
equals method and, with the fix, inherits the one-parameter method from
Object. The backend needs to disambiguate, e.g. by demanding the `decl`
equals in BoxesRunTime instead of the member.
|
|\
| |
| | |
Fix/refined subtyping
|
| |
| |
| |
| |
| | |
Also, make binder type of SkolemType refer to arbitrary type,
not necessarily RefinedType.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In the end, this did not buy us anything. What matters is that
- we can reliably identify RefinedThis types pointing to a given
refinement type. Making sure that the `binder` field of q RefinedThis
type in a refinedInfo is always the containing refined type is good
enough for that.
- we take care to rebind RefinedThis types in isSubType. This was leaky before,
is handled now better in the new isSubType.
So, in the end, adding a level was a needless complication. Also, as a next step
we should be able to identify skolem types and RefinedThis types.
|
| | |
|
| |
| |
| |
| | |
Replaces `asInstanceOf[MutableScope]` calls.
|
|/
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
| |
This doesn't require additional argument. Decision can be made solely from the phaseId.
|
| |
|
| |
|
|
|
|
|
|
| |
Now Try node always has cases as handlers.
In case handler is an Ident of type Throwable => T
than it's desugared to a CaseDef during parsing.
|
|
|
|
| |
Module roots were mis-characterized, which meant that module symbols were loaded twice.
|
|
|
|
|
| |
This avoids stale symbol errors and does not need the somewhat
unsystematic symbol rebinding of the last commit.
|
|
|
|
|
|
|
|
|
|
|
| |
ThisTypes do escape. It seems that Scala 2 pickling produces ThisTypes that refer to base
classes of the class being compiled. If the base class is in a separate compilation unit,
this can lead to a stale class symbol in the ThisType. We solve this here by rebinding the
class symbol in the ThisType. We should also explore the alternative:
class ThisType(tref: TypeRef) ...
That would do the rebinding as part of the generation denotation resolution mechanism.
|
|
|
|
|
| |
Insert LazyRefs to break cycles for F-bounded types that
are unpickled or read from Java signatures.
|
|
|
|
|
|
|
| |
Having two repeated param classes (and two types) does not work,
because we need to maintain an overriding relationship between
Scala repeated param methods and Java repeated param methods (this
will be resolved later by bridges).
|
|
|
|
|
|
| |
Type params should have different flags, depending on whether they are
owned by a method or a class. Only class type parameters are marked Deferred,
protected, and Local.
|
|
|
|
|
|
|
| |
Added several forms of "select" and "appliedTo" methods which construct Select, Apply, TypeApply
trees.
Motivation: Infix methods allow chaining which is more legible than deep nesting.
|
|
|
|
|
|
|
| |
- Some new functionality in tpd and in Symbols.
- Added `sm` interpolator to print nicely.
- Make use of nestedMap where possible.
- Add IdentityDenotTransformer as a convencience class
|
|
|
|
|
| |
Switch to the new scheme where higher-kinded types (and also some polymorphic
type aliases) are represented as instances of Lambda traits.
|
|
|
|
| |
Common code between tpd and Typer has been factored out into class TypeAssigner.
|
|
|
|
|
|
|
|
| |
The root cause of #34 was that we took a type argument which was an existential type. These are returned as type bounds, which make no sense in the calling context. To avoid that problem in the future, `typeArgs`
got renamed to `argInfos`, so it is clear we get an info, not necessarily a value type. There are
also added method `argTypes`, `argTypesLo`, `argTypesHi`, which return a type, but either throw an exception or return a lower/upper approximation of the argument is an existential type.
There's another issue that the existential type only arose when compiling the same couple fo files the seciond time. We need to chase that one down separately.
|
|
|
|
|
|
|
| |
What was `baseType` and is now `baseTypeRef` only computes the prefix of of basetype, not the type arguments.
If type arguments need to be included there is `baseTypeWithArgs`. The reason is that type arguments are usually already encoded as member types. But this was a source of errors because in Scala 2, baseType includes the type arguements.
(also added test file structural.scala forgotten from last commit)
|
|
|
|
|
|
| |
- Avoid closure creation in Position.
- Avoid creating debug string in SymDenotations
- Avoid creating Flag translation tables in pickle buffers
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Several measures:
1. Invalidate classOfId and superIdOfClass in ContextBase after each run. These contain local classes
that should become inaccessible.
2. Also clear implicitScope cache that maps types to their implicit scopes after each run. (not sure whether
this is needed; it did show up in paths from root, but on second thought this might have been a gc-able
cycle.
3. Avoid capturing contexts in lazy annotations.
4. Avoid capturing contexts in functions that compute souceModule and moduleClass
5. Avoid capturing contexts in Unpickler's postReadOp hook.
|
|
|
|
| |
The idea is to use the alias itself. This cuts down on # of typebounds created and makes operations on refined infos and applied types more direct. (reverted from commit 81f31f9b71bc4466d3f04f5ce28ef94051688ecd)
|
|
|
|
| |
The idea is to use the alias itself. This cuts down on # of typebounds created and makes operations on refined infos and applied types more direct.
|
|
|
|
|
|
| |
Instead current ctx is passed through everywhere.
Question: can we factor out ctx better?
|
|
|
|
|
|
|
| |
As a first step, we make the complete method in LazyType take an implicit context parameter. This requires
a fairly large propagation of implicit contexts.
The implicit parameter is ignored for classes inheriting from CompleteInCreationContext (which until now are all completers). The next step will be to make the complete methods of selective lazy types take the current context, rather than the creation context.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
... aligning with treatement of module classes elsewhere.
|
| |
|
|
|
|
| |
To avoid duplication between by-name parameters and expr types, we treat by-name parameters as as having ExprType. A part of this is introducing ByNameTypeTree, a specific tree class for => T types.
|
|
|
|
|
|
| |
traits except Java modules.
We now assume that all classes or traits (with the exception of Java statics) have a constructor.
|
|
|
|
|
|
| |
Previously, alias type refs were also accepted. But this is the wrong assumption for computeMembersNames. So, e.g. instead of leaving an AnyRef we now expand to Object.
Also making ==, != take an Any instead of Object
|
|
|
|
| |
Changed format of UnApply nodes to also take implicit parameters. See doc comment in class Trees.UnApply
|
|
|
|
| |
Also: Standardized on selectorName; Translate $init$ to <init> when unpickling.
|
|
|
|
| |
Broke out common functionality in two new methods: widenExpr, and commonVariance.
|