| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
Fix #1430: Better error messages for type errors involving type variables
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
The previous fix was too drastic, as it would also have omitted
scala, Prefef and other "unqualified owner types" from full names.
We now omit only "empty prefixes", i.e. roots, anonymous classes and
repl qualifiers.
|
| |
| |
| |
| | |
... when printing using RefinedPrinter. PlainPrinter will still show them.
|
| |
| |
| |
| |
| | |
This was already disabled when printing types. Now is also disabled
when printing fully qualified names.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Don't disambiguate in situations like
Predef.String
vs
java.lang.String
where one Symbol is an alias of another with the same name.
Also, fix reviewer comments wrt comments and unused defs.
|
| |
| |
| |
| |
| |
| | |
Normal show will propagate the excpetions. Previously, exceptions were filtered
in both cases, which was redundant. Also, it's good to have a way to show things that
does not mask exceptions, if only to debug problems in show itself.
|
| |
| |
| |
| |
| |
| | |
Needs to read several input lines at once.
Enables repl test of new error messages.
|
| |
| |
| |
| |
| |
| | |
Roll `sm` and `i` into one interpolator (also called `i`)
Evolve `d` to `em` interpolator (for error messages)
New interpolator `ex` with more explanations, replaces disambiguation.
|
| |
| |
| |
| | |
Remove debug info from error message.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Interpolating typevars that appear co- or contra-variantly in a type
is a cleanup measure - it helps keep the constraint set small. However,
if there are uneported errors, some of these errors might report on
unsatisfiable constraints for these type variables. In that case, instantiating
the type variables risks being confusing.
|
| |
| |
| |
| |
| |
| |
| |
| | |
When issuing a type mismatch error, avoid mentioning polyparams
in the current constraint set and their associated typevars. Mention
instead the bound that caused the constrained to become unsatisfiable
(if that bound is unique, i.e. the parameter appears co- or contravariantly
in the type).
|
|\ \
| |/
|/| |
Fix #1437: handle build failure in bin/dotc.
|
| | |
|
|\ \
| | |
| | | |
Fix #1442: add new phase, SelectStatic
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The new behaviour is more reasonable.
Now the module if forced consistently in both examples.
Note that this is deviation from behaviour of scalac.
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Blocks are not denoting trees(why aren't they?)
For now, I'm fixing this using a quick fix.
For future, it may make sense to discuss this on dotty meeting and
make blocks be a Denoting tree and return denotation of expo.
Another option is to move regularisation logic into tree transformers.
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
GenBCode has an implicit assumption that I wasn't aware of:
GetStatic should not be emitted against a valid selector.
If it is, GenBCode messes up the stack by not pop-ing the selector.
Surprisingly, this transformation is perfumed in nsc by flatten.
|
|\ \ \
| | | |
| | | | |
Fix #1443: Replace toplevel TypeBounds with Any
|
| |/ / |
|
|\ \ \
| | | |
| | | | |
Add arrays to collection strawman
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Followinf @szeiger's suggestion, equip IndexView with
optimized operations for map/drop/take.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
When a member is missing, print whether we were looking for
a type or a value.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Avoids missing member in tangledCompanion.scala, which is a minimization
of intermittent failures in CollectionStrawMan6. Intermittent, because it
depended on order of compilation. CollectionTests have to be compiled together with
but before CollectionStrawMan6 (this was _sometimes_ the case because partest did not
honor indicated compilation order so far). I.e.
dotc CollectionTests_2.scala CollectionStrawMan6_1.scala
would trigger the error. tangledCompanion.scala captures the dependencies
in a single file.
|
| | | |
| | | |
| | | |
| | | | |
This is achieved by putting it into a new trait, LinearSeqLike.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
- Add proper :: to lists
- Move some methods to IterableOps in order to keep Iterable clean
- Rename knownLength to knownSize
- Add some implentations for performance and completeness
|
| | | |
| | | |
| | | |
| | | | |
Following the other colltests, put each in a separate package.
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
It's a funny interaction between:
elim-by-name(and erasure specifically);
lift-static;
supercalls.
object E extends F2(new B {})
Here we have an anonymous class new B {} that looks like it is created
by erasure.
For some reason this class forgets the link to original anonymous class:
SymDenot(E$annon1).initial.phase == erasure. I guess this is a bug.
Additionally, the owner of E$annon1 is an anonymous method inside E,
that is inSuperCall and thus we have an anonymous nested class that
has enclosingClass be package. This class looks like a top-level
anonymous class breaking a lot of assumptions in shared backend
and taking multiple branches in unexpected ways.
I'm not sure that this is a proper fix. I assume there's a bigger bug
around, but I don't quite understand it right now and I need to work on
other stuff.
Making a quick fix to unblock @odersky.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Test generated code before but fails with verify error at runtime.
Here's the message:
Exception in thread "main" java.lang.VerifyError: Bad type on operand stack
Exception Details:
Location:
D$.<init>()V @2: invokedynamic
Reason:
Type uninitializedThis (current frame, stack[1]) is not assignable to 'D$'
Current Frame:
bci: @2
flags: { flagThisUninit }
locals: { uninitializedThis }
stack: { uninitializedThis, uninitializedThis }
Bytecode:
0x0000000: 2a2a ba00 1f00 00b7 0022 2ab3 0024 b1
at Test$.main(t3048.scala:13)
at Test.main(t3048.scala)
With the fix in last commit, test causes backend to crash with
java.lang.AssertionError: assertion failed: val <none>
at scala.Predef$.assert(Predef.scala:165)
at scala.tools.nsc.backend.jvm.BCodeHelpers$BCInnerClassGen$class.assertClassNotArray(BCodeHelpers.scala:214)
at scala.tools.nsc.backend.jvm.BCodeHelpers$BCInnerClassGen$class.assertClassNotArrayNotPrimitive(BCodeHelpers.scala:219)
at scala.tools.nsc.backend.jvm.BCodeHelpers$BCInnerClassGen$class.getClassBTypeAndRegisterInnerClass(BCodeHelpers.scala:238)
at scala.tools.nsc.backend.jvm.BCodeSkelBuilder$PlainSkelBuilder.getClassBTypeAndRegisterInnerClass(BCodeSkelBuilder.scala:51)
at scala.tools.nsc.backend.jvm.BCodeHelpers$BCInnerClassGen$class.internalName(BCodeHelpers.scala:210)
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The closures generated by elimByName did not get the InSuperCall
flag set. This caused problems in lambda lift which led to a
verify error for the new version CollectionStrawMan6. That version
replaces explicit function parameters in class LazyList by
by-name parameters.
Also: Clarify logic for liftLocals in LambdaLift (liftLocals caused the immediate
problem but was in the end not to blame).
|
| | | |
| | | |
| | | |
| | | | |
Makes it clearer what it is. Also, fixed check file.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
substDealias did not follow aliases when the prefix of a typeref changed
under substitution. This was exhibited by a bug in extensionMethods which was
first discovered in CollectionStrawMan6 and was minimized in extmethods.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
By making LinearSeq an IterableLike, we can use tail-recursion
on drop.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Demonstrates how to integrate lazy non-view collections
in the framework.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
This PR investigates what it takes to extend CollectionStrawMan5 to
arrays.
|
|\ \ \ \
| |_|/ /
|/| | | |
Fix #1447: Make X$ <:< X.type when X is an object
|
|/ / /
| | |
| | |
| | | |
This allows objects to be easily aliased
|
|\ \ \
| | | |
| | | | |
Fix #1372: Add handler for `PatDef`s to REPL
|
| | | | |
|
|\ \ \ \
| |_|_|/
|/| | | |
Fix #1367: Add ParsedTry case to UntypedTree{Copier,Map,Accumulator}
|
|/ / / |
|