aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Make sure local data is unpickled at right phaseMartin Odersky2016-05-231-2/+4
| | | | | | | | | | | | | We had a problem where unpickling an annotation containing a class constant had the wrong type. Unpickling was done after erasure. The type given to the constant was an alias but aliases got eliminated during erasure, so the constant was malformed. Unpickling annotation contents at the same phase as unpickling the annotation carrier solves the problem. It seems similar problems can arise when data is unpickled using a LocalUnpickler. So we now make sure local unpickling runs at the latest at phase Pickler.
* Don't force a symbol's denotation for isTerm/isTypeMartin Odersky2016-05-232-3/+3
| | | | | | | | Forcing it led to CyclicReferences involving RefChecks.OptLevelInfo when compiling dotc/*.scala against Tasty files. The problem was that when transforming OptLevelInfo the backend forced a transformInfo of RefChecks in TypeErasure which filtered RefCheck's scope to eliminate non-class type definitions. Without the tweak in this commit this tried to make all symbols current, and so came back to OptLevelInfo.
* Instrument Denotations#current to find CyclicReferenceMartin Odersky2016-05-231-1/+7
| | | | | Instrument Denotations#current to find CyclicReference errors arising during transforms.
* Decouple annotation transformers from info transformersMartin Odersky2016-05-234-25/+16
|
* Further improve doc commentMartin Odersky2016-05-231-2/+3
|
* Disable stub checkingMartin Odersky2016-05-231-4/+13
| | | | | | | It caused an assertion error when separately compiling parts of dotty against TASTY information. Not sure the test achieves anything or whether it produces a false negative.
* Use source module ref as assumed self type when reading TastyMartin Odersky2016-05-231-2/+6
| | | | | | | | When reading Tasty we need to pre-set the info of a class to some ClassInfoType with (as yet) unknown parents and self type. But for module classes, we need to know the source module at all time, and this gets determined by the self type. So we now produce a TermRef for the assumed self type of a module class.
* Merge pull request #1243 from dotty-staging/fix-#1240odersky2016-05-2313-58/+231
|\ | | | | Fix overriding problems
| * Two more testsMartin Odersky2016-05-192-0/+30
| | | | | | | | Unrelated to other commits but useful to get in.
| * Better doc commentMartin Odersky2016-05-191-1/+10
| |
| * Fix testMartin Odersky2016-05-191-2/+2
| | | | | | | | | | | | | | | | | | | | The previous additional test messed up partest in that file Types.scala was copied twice into the partest-generated directory and then the pos/core tests would compile both copies. This gave a double definition which manifested itself under -Yno-double-bindings as an assertion error. Ideally, partest generation would guard against this situation. For now I avoid the problem by compiling the whole of core without -Ycheck, not jst Types.scala.
| * Fix dotc bootstrap failureMartin Odersky2016-05-192-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During an attempted dotty bootstrap it was noted that Types.scala did not compile anymore, because `checkUnique` threw a `TypeError` during erasure. The issue was an overloaded member `name` in TermrefWithSig. In NamedType: def name: Name In TermRef: def name: TermName Before erasure, there's one member `name`, after erasure there are two (because after erasure result type counts). The error arose when trying to recompute a member of a `TermRefWithSig` where the name is `name` and the expected signature is `(Nil, ?)`. Since there are two members that match the name and the signature, `checkUnique` triggered a `TypeError`. Before adding `checkUnique`, the previous `atSignature` call would just have returned an arbitrary choice among the two alternative definitions of `name`. The fix is not to use `checkUnique` but to fall back to `d.current` in the case where several alternatives appear. Interestingly, the failure only triggers when -Ycheck options are *disabled*. I added a new test that compiles Types.scala without checks, so we catch this and possibly similar bugs in the future.
| * Remove stray testMartin Odersky2016-05-191-17/+0
| | | | | | | | Real test is in neg/customargs
| * Handle MergeErrors in RefChecksMartin Odersky2016-05-193-15/+31
| | | | | | | | | | Used to throw an uncaught merge error in checkAllOverrides when compiling i1240c.scala.
| * Another test case involving super accessorsMartin Odersky2016-05-182-2/+19
| |
| * Refined handling of atSignatureMartin Odersky2016-05-183-25/+29
| | | | | | | | | | | | | | | | | | | | We cannot throw a merge error if atSignature does not give a unique single denotation. Counter example is compiling dotty itself, where we get a false negative during bridge generation. Instead, atSigature needs to return a normal denotation, and we need to check separately where required that a denotation is in fact a SingleDenotation.
| * 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.
| * A test case for overloading/overriding interactionsMartin Odersky2016-05-181-0/+27
| | | | | | | | | | This showcases a tricky interaction between overloading and overriding. See discussion of #1240 for context.
| * Issue MergeError exception for double def situationsMartin Odersky2016-05-184-57/+85
| | | | | | | | | | | | | | | | 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.
| * Fix test caseMartin Odersky2016-05-181-2/+2
| |
| * Test caseMartin Odersky2016-05-182-1/+42
| |
| * 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-1028-80/+2431
|\ | | | | 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
| |
| * Rename old DottyRepl (used for power mode) using ILoop to TypeStealerFelix Mulder2016-04-291-1/+1
| |
| * Fix stdin/out for repl launched by SBTFelix Mulder2016-04-281-0/+4
| | | | | | | | | | Launching the repl with: `runMain dotty.tools.dotc.repl.Main` is now working correctly
| * Revert Scanners and Tokens to their original formFelix Mulder2016-04-285-81/+14
| | | | | | | | | | 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-288-95/+83
| |
| * Highlight comments, remove scanner wrapping syntax highlighterFelix Mulder2016-04-281-242/+119
| |
| * Initial implementation featuring two different highlightersFelix Mulder2016-04-2822-26/+2523
| | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge pull request #1248 from lampepfl/DarkDimius-patch-6Dmitry Petrashko2016-05-101-19/+65
|\ \ | | | | | | Update Readme.md for ScalaDays
| * | Update README.mdDmitry Petrashko2016-05-101-1/+1
| | |
| * | Update README.mdDmitry Petrashko2016-05-091-0/+1
| | |
| * | Update README.mdDmitry Petrashko2016-05-091-3/+3
| | |
| * | Update README.mdDmitry Petrashko2016-05-091-28/+29
| | |
| * | Update README.mdDmitry Petrashko2016-05-091-2/+3
| | |
| * | Update README.mdDmitry Petrashko2016-05-091-2/+2
| | |
| * | Update Readme.md for ScalaDaysDmitry Petrashko2016-05-091-19/+62
|/ / | | | | @odersky please review
* | Merge pull request #1245 from dotty-staging/elimselfDmitry Petrashko2016-05-041-2/+16
|\ \ | | | | | | eliminate self symbol in Template and ClassInfo
| * | eliminate self symbol in Template and ClassInfoliu fengyun2016-05-021-2/+16
|/ /
* | Merge pull request #1241 from dotty-staging/fix-#1222Dmitry Petrashko2016-04-294-7/+20
|\ \ | |/ |/| Transform annotations only if defined in current run
| * 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.