| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| |
| | |
Also fix printing of variances in typedefs and params;
they were suppressed before.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Map self-references in refinements to recursive types. This
commit does this for refinement types appearing in source.
We still have to do it for unpickled refinements.
Test apply-equiv got moved to pending because it simulates
the old higher-kinded type encoding in source, which relies
on the old representation in terms of self-referential refinement
types. The plan is not to adapt this encoding to the new
representation, but to replace it with a different encoding
that makes critical use of the added power of recursive types.
Use recursive types also when unpickling from Scala 2.x.
Add mapInfo method to Denotations.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
They not print similar to scalac: "?x" where `x` is a unique number.
Todo: An offline explanation what they are, similar to javac. I.e.
... ?3 ...
where ?3: T
|
| |
| |
| |
| |
| | |
Treat parent like refinedInfo. Introduce isBinding convenience method
in TypeBounds.
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fix gives the position and refactors the code that gave off
warnings, but it also begs the question - should we be able to handle
emitting a switch for the following case:
```scala
(x: @switch) match {
case 'a' if somePredicate(x) => // ...
case 'b' => // ...
}
```
Currently if there is a guard, the patternmatcher will fail to emit
a switch. Scalac can handle these cases currently.
|
|
|
|
| |
This came up when tasty-checking Eq.scala.
|
|
|
|
|
| |
When enter pressed immediately after keyword, the highlighting would be
aborted
|
| |
|
|\
| |
| | |
Improvements to cyclic checking, avoidance, named parameters
|
| |
| |
| |
| | |
Explicitly given type parameters were printed twice.
|
| |
| |
| |
| | |
To address #1198, we need to avoid putting symbols in ErasedValueTypes.
|
|/
|
|
|
| |
Mode is used from a lot of low-level code, does not just reflect Typer info.
So it makes more sense top to place it in the core package.
|
|
|
|
|
|
|
| |
The field keeps track of the element type. This is necessary
because JavaSeqLiteral is nonvariant and the elements might
be empty, so we cannot always compute the type from the
element types.
|
|
|
|
|
|
| |
`membersBasedOnFlags(requiredFlags = AnyFlags, excludedFlags = ...)` is
easier to understand than
`membersBasedOnFlags(requiredFlags = AllFlags, excludedFlags = ...)`
|
| |
|
| |
|
|
|
|
|
|
| |
Instead, a new setting called -Yplain-printer is used for this.
After this commit, we can now run all tests with -Ydebug (this was not
the case before because using the plain printer breaks -Ytest-pickler)
|
|
|
|
|
|
|
|
|
| |
They're not very useful for end users and some tests like
tests/neg/selfreq.scala always print these exceptions which makes it
harder to read the test logs,
Also use Thread.dumpStack() instead of creating an Exception and calling
printStackTrace() on it.
|
| |
|
| |
|
|
|
|
| |
by bringing homogenization of # $Apply projections back.
|
| |
|
|
|
|
| |
Printing bounds omits the "<:" otherwise.
|
|
|
|
|
| |
Previous implementation died because
TermRef had no denotation.
|
| |
|
| |
|
|
|
|
|
|
|
| |
It turns out it's not needed because now all type arguments are
expressed as aliases. Interestingly dropping this feature shaved
20% off the time off junit tests. Which seems to indicate that the
handling of type application is really performance critical.
|
|
|
|
|
|
|
|
|
| |
The fact that the annotation comes first is weird, because when I write
an annotated type it's <type> @<annotation>. Also, annotated types
are like RefinedTypes in that they derive from a parent type. And in
RefinedTypes the parent comes first.
So swapping the arguments improves consistency.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Symbols are not stable between runs, so if some symbol referred
to from Definitions gets recompiled, there are then two Symbols
that are both visible, one referenced from Definitions, the other
the one that got compiled.
Thos led to a crash when e.g. compiling scala.Short, because the
newly compiled symbol was not recognized as a primitive value
class.
The present commit tries to make systematic changes without regard
to simplicity or aesthetics. This will be polished in future commits.
// ### comments signal areas that need further attention.
|
|
|
|
|
| |
Differences can be observed when checking neg/variances.scala.
Review and any necessary polishing by @smarter.
|
|
|
|
|
|
| |
withMode sets the whole mode, nit an individual bits. This was used
wrongly in several places. Make this less of a trap by renaming
withMode -> withModeBits.
|
|
|
|
| |
Want to have a unique name for Apply, so that tests for higher-kinded types become cheaper.
|
|
|
|
|
| |
In the type `(A & B)(C.this)`, the first parens were missing, so the type
displayed as A & B(C.this), which is confusing.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move addMode and friends to two decorators, one for Context, the other
for FreshContext. Implement behavior accordingly.
This avoids creating two contexts in situations like:
c.fresh.setxploreTyperState.addMode(...)
Mow we can write
c.fresh.addMode(...).setExploreTyperState
Because addMode returns a fresh context when applied to a fresh context.
Note that we specifically do not want virtual dispatch of addMode, that's
why it was moved to a decorator.
Also: removed mention of ".fresh: when just forllowed by an addMode, because
that one is redundant.
|
|
|
|
|
| |
Previously, we'd see something like `? { :+: Int }`, which is confusing.
Now we see instead `? { :+ : Int }`.
|
|
|
|
|
|
|
| |
SkolemTypes are no longer needed when Pickling because they exist only
for checking type-safety. After the typer, we can safely eliminate them.
Not having skolem types in TASTY simplifies the format and avoids having
to explain a difficult concept.
|
| |
|
|
|
|
|
|
|
| |
SkolemTypes need to behave differently form RefinedThis types in TypeMap
and TypeAccumulator. For skolem types these should follow through to the
underlying type. For RefinedThis types, these need to do nothing, in order
not to start an infinite recursion.
|
|
|
|
|
|
| |
It definitely does appear in trees, so should be included in the set.
Affects how things are printed. Before, typed var's would still show up
as vals.
|
|
|
|
|
| |
Displaying stuff should never report an exception or cause more messages to be displayed that
relate to the displaying.
|
|
|
|
| |
Previously, this fell back to toString
|
|
|
|
|
|
|
|
| |
Use the proposed Lambda syntax
[HK$0, ..., HK$n] => body
for them.
|
|
|
|
|
|
|
|
|
|
|
| |
Idea: when printing, we should be more lenient about conditions that
would otherwise cause an assertion failure, because we want to avoid
triggering further assertions while diagnosing previous errors. As a start
we generalize an assertion that RefinedTypes cannot be created after erasure.
This gets triggered when playing around with printing lambdas at erasure time
(see following commit): erasure runs at phase erasure + 1, so ctx.erasedTypes is true,
but we might still want to print lambdas then, and printing lambdas will create new
refined types as of next commit.
|
|
|
|
| |
Previous scheme did not work after erasure.
|
| |
|
|\
| |
| | |
Implement/i499
|
| |
| |
| |
| | |
Was missing before, ffell back to raw printing.
|
|\ \
| |/
|/| |
Refactor/super accessors
|
| |
| |
| |
| |
| |
| | |
Was missing before. Needed a tweak in PlainPrinter for printing
import symbol references (their denotation is not current after pickling, so
they would have printed differently after and before pickling).
|