aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Revert: ResolveOverloaded should handle alternatives that are the same TermRefMartin Odersky2016-05-181-10/+6
| | | | | | | This happens once we do not merge methods with the same signature coming from the same class. (reverted from commit 83262d090a98e2374c9b3e5a1480892397d695d3) This case no longer applies as such a situation will now give a MergeError instead.
* Issue MergeError exception for double def situationsMartin Odersky2016-05-182-40/+65
| | | | | | | | When finding two symbols in the same class that have the same signature as seen from some prefix, issue a merge error. This is simpler and more robust than the alternative of producing an overloaded denotation and dealing with it afterwards.
* ResolveOverloaded should handle alternatives that are the same TermRefMartin Odersky2016-05-181-6/+10
| | | | | This happens once we do not merge methods with the same signature coming from the same class.
* Don't copy Any constructor to Object in ErasureMartin Odersky2016-05-181-3/+9
| | | | | | | | Once we do not merge methods with same signature anymore we got an ambiguous overload between the constructors of Any and Object after erasure (when all Any methods are moved to Object). To avoid this, we map the Any constructor to the Object constructor after erasure.
* Avoid merging denotations of different symbols in same classMartin Odersky2016-05-181-1/+8
| | | | | | | | #1240 shows that we need to detect ambiguous overloads of methods coming from the same base class (with different signatures there) that have the same signature in some deriving class. This was undetected before because the two methods were simply merged into one overloaded alternative.
* Merge pull request #1233 from felixmulder/topic/repl-syntax-highlightingDmitry Petrashko2016-05-1022-41/+2422
|\ | | | | Syntax highlighting for REPL using ammonite as base instead of JLine
| * Fix keywords sometimes not highlighted in multilnFelix Mulder2016-04-291-2/+2
| | | | | | | | | | When enter pressed immediately after keyword, the highlighting would be aborted
| * Add Ammonite's MIT licenseFelix Mulder2016-04-2915-231/+248
| |
| * 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.
* | eliminate self symbol in Template and ClassInfoliu fengyun2016-05-021-2/+16
| |
* | Ensure more things are completedMartin Odersky2016-04-291-1/+5
| | | | | | | | | | | | | | As noticed by @smarter we need to ensure that classes owning derived type params are completed, so that trees get the proper symbol attachments. This triggered when I changed annotation transformers - I have no idea whether how two could be related, though.
* | Refine todo commentMartin Odersky2016-04-292-2/+4
| |
* | Transform annotations only if defined in current runMartin Odersky2016-04-291-4/+11
|/ | | | | | | | There's no point transforming annotations that come from classfiles. It's inefficient to do so and it's also risky because it means we'd have to make sense of Scala-2 generated trees. This should avoid the error in #1222.
* 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.