aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Don't evaluate isInstanceOf for value classes, disable bugged testsFelix Mulder2016-05-266-30/+44
| | | | | | | The tests `i1059.scala` and `t3480.scala` are failing due to a bug in pattern matcher that evaluates the `x` in `List(x: _*)` incorrectly. Concerned issue: #1276
* Address reviewer feedbackFelix Mulder2016-05-261-10/+19
|
* Fix primitive rewritingFelix Mulder2016-05-261-1/+1
|
* Rewrite `TypeApply` to null-check on rewrite to true, add docstringsFelix Mulder2016-05-261-23/+82
|
* Add initial partial evaluation of isInstanceOf callsFelix Mulder2016-05-263-2/+92
|
* Merge pull request #1246 from dotty-staging/add-multiversal-equals-2odersky2016-05-2522-70/+524
|\ | | | | Multiversal Equality
| * Fix doc commentMartin Odersky2016-05-231-1/+1
| |
| * Move eqAny to PredefMartin Odersky2016-05-234-15/+14
| |
| * Add Eq instances of standard types to PredefMartin Odersky2016-05-234-4/+53
| | | | | | | | | | | | | | | | | | To make tests pass, this required a looser specification of `assumedCanEquals`, so that an abstract type T can be compared to arbitrary values, as long as its upper bound can be compared. E.g. T == null T == "abc"
| * Address reviewers commentsMartin Odersky2016-05-231-5/+5
| |
| * Tweak of valid eqAny conditionMartin Odersky2016-05-231-39/+30
| |
| * Fix comments in Eq class and make it a trait.Martin Odersky2016-05-231-4/+7
| |
| * Make use of implicitNotFound for eqaulity errorsMartin Odersky2016-05-233-4/+6
| | | | | | | | | | Needed a fix in string interpolation for suriviving inserted types that contain `$` characters.
| * Safe equality for core classes:Martin Odersky2016-05-236-6/+14
| | | | | | | | | | | | | | Name, Symbol, Denotation, Type. This uncovered two nonsensical comparisons, one in CollectEntryPoints, the other in DottyBackendInterface.
| * Add Java types to equality testMartin Odersky2016-05-231-0/+21
| |
| * Print diagnostics to implicits printerMartin Odersky2016-05-231-2/+2
| |
| * Make Eq contravariantMartin Odersky2016-05-232-5/+21
| | | | | | | | (and add it to commit set).
| * Test caseMartin Odersky2016-05-231-0/+80
| |
| * Check equality that with == and != makes senseMartin Odersky2016-05-233-13/+46
| | | | | | | | | | | | This is done by checking each instance of an eqAny implicit so that it does not contain non-bottom instances of equality types as instances.
| * Hooks to check that comparisons with == / != make senseMartin Odersky2016-05-237-142/+220
| | | | | | | | | | | | | | | | | | | | Also, check that pattern matching against idents/selects/literals makes sense. The hooks perform an implicit search for an instance of `Eq[L, R]`, where `L`, `R` are the argument types. So far this always succeeeds because Eq.eqAny matches all such types. A separate commit will check the returned search term for validity.
| * Fixed error in commentMartin Odersky2016-05-231-2/+2
| |
| * Add new strawman for multiversal equalityMartin Odersky2016-05-231-0/+96
| |
| * Downwards comparisons for implicit search and overloading resolutionMartin Odersky2016-05-235-5/+61
| | | | | | | | | | | | | | | | | | Compare selected contravariant arguments as if they were covariant. Which ones is explained in the doc comment for method `isAsSpecificValueType` in Applications.scala. This has the same motivation than what @paulp proposed around 2012. The solution is a bit different from the one proposed then because it only affects top-level parameters.
| * Ignore LazyRefs in Tasty pickling comparisonsMartin Odersky2016-05-231-0/+2
| | | | | | | | This came up when tasty-checking Eq.scala.
| * Fix caching problem when computing implicit scopesMartin Odersky2016-05-231-1/+1
| | | | | | | | | | | | Caches were set when information was not complete yet. Problem was exhibited by missing some `eqName` implicits when adding safe equality for Name.
| * Make sure type parameters correspond to type args in applyOveroadedMartin Odersky2016-05-231-1/+7
| | | | | | | | | | | | tpd.applyOverloaded should not do type parameter inference; therefore it has to make sure all eligible alternatives have the same number of type parameters as there are type arguments.
| * Allow auto-tupling for arguments to overloaded methodsMartin Odersky2016-05-231-6/+20
| | | | | | | | | | | | | | | | If all overloaded variants of a method are uniary, we should also allow auto-tupling. This is necessary to make overloaded `==' methods work in cases like: xs == (1, 2)
* | Merge pull request #1278 from Blaisorblade/topic/javadoc-buildGuillaume Martres2016-05-257-24/+27
|\ \ | | | | | | Fix errors with Javadoc 8
| * | Fix remaining Javadoc warningsPaolo G. Giarrusso2016-05-256-22/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | As a reference for how to fix warnings appropriately, I used http://www.oracle.com/technetwork/articles/java/index-137868.html However, I did not refrain from moving the entire JavaDoc of a method into `@return` rather than repeating it, even though the guide (at a quick skimming) seems to suggest otherwise.
| * | Fix errors with Javadoc 8Paolo G. Giarrusso2016-05-252-2/+2
|/ / | | | | | | | | `sbt dotty-interfaces/publishLocal` fails for me, fix enough errors to make it work.
* | Merge pull request #1277 from dotty-staging/fix-dotcDmitry Petrashko2016-05-251-1/+1
|\ \ | |/ |/| fix newline in DOTTY_ROOT when cd produces output
| * fix newline in DOTTY_ROOT when cd produces outputOndrej Lhotak2016-05-251-1/+1
| |
* | Merge pull request #1249 from dotty-staging/change-early-annotsodersky2016-05-233-2/+14
|\ \ | | | | | | Evaluate annotations before completing tree of definitions
| * | Add class annotations as first step of completing the class.Martin Odersky2016-05-131-1/+2
| | |
| * | Explain specific changes in later strawman proposalsMartin Odersky2016-05-122-0/+11
| | | | | | | | | | | | ... relative to CollectionStrawman1.
| * | Evaluate annotations before completing tree of definitionsMartin Odersky2016-05-101-1/+1
| |/ | | | | | | | | | | | | Motive: That way we can identify annotation macros without special name resolution rules. This was surprisingly easy.
* | 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
| |