aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Revert Scanners and Tokens to their original formFelix Mulder2016-04-282-44/+12
| | | | | Since we decided to go with the non dotty-scanner approach these are unnecessary to have altered, might just as well revert them.
* Fix `:...` commands printing erroneous messages on next newlineFelix Mulder2016-04-282-2/+2
|
* Fix error messages not being doubled and being on a new lineFelix Mulder2016-04-283-22/+24
|
* Fix highlighting tokens after newline predated by '='Felix Mulder2016-04-282-4/+4
|
* Fix interpret dummy line before prompt displayedFelix Mulder2016-04-281-3/+2
|
* Stop interpreter from interpreting twice on enterFelix Mulder2016-04-284-5/+39
|
* Add multiline support using ammonite multilineFilterFelix Mulder2016-04-287-94/+82
|
* Highlight comments, remove scanner wrapping syntax highlighterFelix Mulder2016-04-281-242/+119
|
* Initial implementation featuring two different highlightersFelix Mulder2016-04-2820-24/+2520
| | | | | | | | | | | One was implemted by hand and the other by using dotty's parser. The one built by hand is shorter, and behaves correctly. The scanner one is unfortunately not ready for testing - there are too many things that are workarounds for it to be a good solution as of now The code added from Ammonite is licensed under MIT, not sure where to put the license - but will add it once I know.
* Allow dependent method type for unapply.Martin Odersky2016-04-271-3/+2
|
* Revert: Better error diagnostics for "not an extractor" errors.Martin Odersky2016-04-271-17/+2
| | | | | No longer needed because we are going to allow dependent method types in extractors, and the unary requirement is kind of obvious.
* Dealias more types in resultTypeMartin Odersky2016-04-271-26/+31
| | | | | Since we now recognize more false dependencies, we have to dealias the new dependencies accordingly.
* Add FurtureDefsOK for isBottomTypeMartin Odersky2016-04-271-1/+7
| | | | | | Triggered by change in TypeComparer. I guess we should think of dropping the NotDefiendHere tests, for a long time they gave us only false negatives.
* Better error diagnostics for "not an extractor" errors.Martin Odersky2016-04-271-2/+17
| | | | | Now explains in detail why an possibly found unapply or unapplySeq is ineligible.
* Fix misprediction of dependent method type status.Martin Odersky2016-04-271-7/+10
| | | | | | | | | #1235.scala contains a case of a method type of the form (x: T) ... x.tail.N ... where N is an alias. We need to follow the alias to prevent a mischaracterization that this is a dependent method type.
* Avoid forming ???.T type.Martin Odersky2016-04-271-1/+2
| | | | | | More generally, avoid forming a type selection on a term prefix which has a bottom class as a type. There might be other places where we have to take similar measures. For now, this one fixes #1235.
* Rename Reporting#println -> Reporting#echoMartin Odersky2016-04-278-27/+26
| | | | | | | | | | There's a trap otherwise that, when in a class inheriting from Context (and with it Reporting) a call to println will go to this.println and therefore might not print at all, if the current context buffers messages. I lost a lot of time on this on several occasions when I scratched my head why a simple debug println would not show. Better avoid this in the future for myself and others.
* Merge pull request #1237 from dotty-staging/vc-ofDimDmitry Petrashko2016-04-261-4/+6
|\ | | | | arrayConstructors: do not rewrite ofDim for arrays of value classes
| * arrayConstructors: do not rewrite ofDim for arrays of value classesVladimirNik2016-04-261-4/+6
| |
* | Merge branch 'master' into fix-equalityodersky2016-04-261-5/+20
|\ \
| * \ Merge pull request #1227 from dotty-staging/implement-1221Dmitry Petrashko2016-04-261-5/+20
| |\ \ | | |/ | |/| Allow to specify per-callsite @tailrec annotation.
| | * Tailrec:report error if method containing @tailrec callsite isn't finalDmitry Petrashko2016-04-181-2/+16
| | |
| | * Implement #1221. Allow to specify per-callsite @tailrec annotation.Dmitry Petrashko2016-04-181-3/+4
| | | | | | | | | | | | See examples in following commit.
* | | Comment out debug printlnMartin Odersky2016-04-221-1/+1
| | |
* | | Support implicitNotFound annotationMartin Odersky2016-04-223-1/+24
| | |
* | | Avoid propagating unresolved implicitsMartin Odersky2016-04-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an implicit argument is not found, we should in any case assume the result type of the implicit method as the type of the tree (after reporting an error, of course). If we don't do that, we get implicit errors on weird positions when we try to find an implicit argument for the same tree again. This caused a spurious error in subtyping.scala, and also caused an additional error at the end of EqualityStrawman1.scala.
* | | Fix constraint handling in eitherIsSubtypeMartin Odersky2016-04-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The logic in typeComparer#eitherIsSubtype was flawed. In the case of A & B <: C, if A <: C but not B <: C we need to return with the constraint of A <: C, but we returned with the initial constraint instead.
* | | Always minimize type variables when interpolating an expected type of an ↵Martin Odersky2016-04-212-7/+8
|/ / | | | | | | | | | | implicit. This was suggested in #878.
* | Merge pull request #1219 from dotty-staging/fix-strawmansDmitry Petrashko2016-04-2011-46/+654
|\ \ | | | | | | Fix strawmans
| * | Updates of strawmanMartin Odersky2016-04-172-67/+130
| | | | | | | | | | | | | | | Bring strawman-4 and strawman-5 to feature-parity. Test also strawman-4.
| * | Strawman polishingMartin Odersky2016-04-161-9/+3
| | |
| * | Add companions to value classes during desugaringsMartin Odersky2016-04-153-8/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This means companions will be pickled and we can drop the special treatement in transformInfo of FirstTransform. That method is problematic, since it enters new symbols into a class scope. This is not allowed, since transformInfo needs to be purely functional, side effects are not permitted (`enteredAfter` does not work either). The problem manifested itself when compiling colltest5 with a requirement failure in the code of `entered` when called from FirstTransform (trying to enter in a frozen class). TODO: Once we use statics for LazyVals we can get rid of the "add companion object" logic in FirstTransform alltogether.
| * | Make Names immutable SeqsMartin Odersky2016-04-151-1/+1
| | |
| * | Tweak in NameOpsMartin Odersky2016-04-151-1/+1
| | | | | | | | | | | | | | | The previous version seemed to fail non-deterministaically, but after a while I could not reproduce it anymore. Anyway, leaving the change in.
| * | Dealias applied type constructorsMartin Odersky2016-04-151-2/+10
| | | | | | | | | | | | | | | | | | Dealias TypeRefs that get applied to type arguments. Without that precaution we get Stackoverflows in lookupRefined/betaReduce for CollectionStrawMan5.scala.
| * | Fix toString and productPrefix of case objectsMartin Odersky2016-04-151-2/+6
| | | | | | | | | | | | Need to drop the final `$' in both cases.
| * | Fix #765 for super accessorsMartin Odersky2016-04-151-1/+10
| | | | | | | | | | | | | | | Partial fix of #765. Hack to make sure unexpandedName works for super accessor names.
| * | Create LambdaTraits referred to from UnpicklerMartin Odersky2016-04-152-1/+8
| | | | | | | | | | | | | | | LambdaTraits are created on demand; we need to make sure they exist when referred to from Tasty.
| * | Small improvements in TypesMartin Odersky2016-04-151-2/+4
| | | | | | | | | | | | | | | 1) Print RefinedTypes with their hashCode so that we can correlated with RefinedThis types 2) Fast abort of instantiate in case we have determined that it is not safe anyway
| * | New testsMartin Odersky2016-04-152-1/+510
| | | | | | | | | | | | | | | | | | | | | New CollectionStrawMan5, executed as runttest in two different ways: - built with scalac, test compiled by dotty in tests/run. - built with dotty, test compiled by dotty using separate compilation.
* | | Address review comments of #1188Dmitry Petrashko2016-04-183-9/+10
| | |
* | | Address review comments.Dmitry Petrashko2016-04-181-5/+5
| | | | | | | | | | | | https://github.com/lampepfl/dotty/pull/1188
* | | ArrayConstructors: don't optimise creating of multi-dim generic arrays.Dmitry Petrashko2016-04-181-8/+7
| | | | | | | | | | | | They need to be created through their class tag.
* | | Separate handling of genericArray creation from normal ones.Dmitry Petrashko2016-04-183-18/+18
| | | | | | | | | | | | | | | | | | This allowed to simplify the code in both Applications and tpd.newArray. Now, only creation of generic arrays is handled by typer. All other arrays are handled in ArrayConstructors phase.
* | | Bring back convertNewArray into typer.Dmitry Petrashko2016-04-182-2/+15
| | | | | | | | | | | | | | | It's needed in order to create calls to newGenricArray as it needs to infer the ClassTag.
* | | make tpd.JavaSeqLiteral return JavaSeqLiteralDmitry Petrashko2016-04-182-3/+4
| | |
* | | Erasure: Erase constant literals.Dmitry Petrashko2016-04-181-2/+3
| | | | | | | | | | | | | | | | | | The problem comes from JavaArrayTypes. They are invalid before erasure, and cannot be pickled, while Array[T] is invalid after erasure and should be erased.
* | | Update to new version of DottyBackendInterface.Dmitry Petrashko2016-04-181-8/+1
| | | | | | | | | | | | That knows that there exists only single magical array method.
* | | Decouple handling array constructors from typer.Dmitry Petrashko2016-04-185-14/+67
| | | | | | | | | | | | It's done in a separate ArrayConstructors phase now.
* | | Get rid of all new***Array methods expect one.Dmitry Petrashko2016-04-183-53/+22
| | | | | | | | | | | | | | | This one is able to encode creation of array of any type and any dimension. Note, it does not handle value classes.