aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Accommodate Scala2 name resolution schemeMartin Odersky2016-08-264-28/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Scala2 does not conform to spec Section 2, where it says: Bindings of different kinds have a precedence defined on them: 1. Definitions and declarations that are local, inherited, or made available by a package clause and also defined in the same compilation unit as the reference, have highest precedence. 2. Explicit imports have next highest precedence. 3. Wildcard imports have next highest precedence. 4. Definitions made available by a package clause, but not also defined in the same compilation unit as the reference, have lowest precedence. In fact Scala 2, merges (1) and (4) into highest precedence. This commit simulates the Scala2 behavior under -language:Scala2, but gives a migration warning. For the naming-resolution test case we get: dotc *.scala -language:Scala2 -migration callsite.scala:9: migration warning: Name resolution will change. currently selected : naming.resolution.Files in the future, without -language:Scala2: java.nio.file.Files' where Files is a type in package object package which is an alias of java.util.stream.Stream[java.nio.file.Path] Files' is a class in package file def gimmeFiles: Files = Files.list(Paths.get(".")) ^ one warning found
* Fix #1457: Three incompatbilities with scalacMartin Odersky2016-08-239-6/+27
| | | | | | | | Two of these are unavoidable. I moved the tests to diabled/not-representable and added in each case a comment to the main scala file detailing why there is a deviation. The last one (import-rewrite) is fixed.
* Merge pull request #1464 from olafurpg/incompatibilitiesodersky2016-08-238-0/+64
|\ | | | | Three incompatibilities with scalac.
| * Three incompatibilities with scalac.Ólafur Páll Geirsson2016-08-238-0/+64
|/ | | | | | Using Scala 2.11.8 and dotty at bcfa3be8cfe2be. cc/ #1457
* Merge pull request #1456 from dotty-staging/fix-#1444odersky2016-08-217-15/+95
|\ | | | | Fix #1444: Pass implicits to parameterless traits if needed
| * Fix testMartin Odersky2016-08-201-1/+1
| |
| * Fix #1444: Add implicit arguments to supertraitsMartin Odersky2016-08-207-15/+95
| | | | | | | | | | | | | | | | If a super trait is given as a type (i.e. no argument list), implicit args were not passed. This is fixed now. Also, we now check for parameterized traits lacking type arguments in Typer instead of in Mixin. Fixes #1444.
* | Merge pull request #1459 from dotty-staging/tests3odersky2016-08-219-59/+64
|\ \ | | | | | | Refinements to auto-tupling
| * | Address reviewers comments.Martin Odersky2016-08-212-7/+2
| | |
| * | Add import back.Martin Odersky2016-08-181-0/+2
| | | | | | | | | | | | Needed because the test is also run in neg wihtout command line option.
| * | Test reshufflingMartin Odersky2016-08-183-25/+5
| | | | | | | | | | | | | | | | | | - Delete redundant t2660 (exists elready in pos) - Comment t1756 - Recategorize tryexpr
| * | Refinements to auto tuplingMartin Odersky2016-08-186-31/+59
| |/ | | | | | | | | | | | | | | | | | | There's a nasty interaction with auto-tupling and trying to insert an implicit on the qualifier of a call. If the original call fails, we need to "undo" any auto-tupling decisions in calls where an implicit is inserted on the qualifier. Also: Needed to fix canAutoTuple test so that Scala2 feature is checked instead of dotty's. Also: Drop features in dotty.language that duplicate those in scala.language.
* | Merge pull request #1458 from dotty-staging/fix-compare-singletonsGuillaume Martres2016-08-206-9/+15
|\ \ | |/ |/| Fixes for comparing and avoiding singletons
| * Add passing testMartin Odersky2016-08-183-0/+15
| | | | | | | | Needs to be done in pos-special because junit tests do not recognize _1, _2.
| * Fix to avoidance of singleton type argumentsMartin Odersky2016-08-183-9/+4
| | | | | | | | Bring in line with comparisons. Fixes z1720 for good.
| * Fixes in comparisons between singleton typesMartin Odersky2016-08-182-8/+4
|/ | | | | Needed to address problem shown by z1720.scala. Another fix to avoidance is needed to make it pass completely.
* Merge pull request #1452 from dotty-staging/fix-#1432Guillaume Martres2016-08-174-2/+18
|\ | | | | Fix desugaring of Bind(WILDCARD, _).
| * Fix #1432: Fix desugaring of Bind(WILDCARD, _).Nicolas Stucki2016-08-154-2/+18
| |
* | Merge pull request #1455 from dotty-staging/tests2Guillaume Martres2016-08-1719-30/+40
|\ \ | | | | | | Fix remaining hk issues in pending
| * | Add passing testsMartin Odersky2016-08-1710-2/+2
| | |
| * | Fix eta expansion for deeply curried methodsMartin Odersky2016-08-173-23/+6
| | | | | | | | | | | | | | | | | | Eta expansion yielded incorrect result if the eta expanded method has more than one parameter sections and the expected result type is a unary function type. In that case a postfix `_' needs to be appended.
| * | Harden copmpareHkApply for ill-typed programsMartin Odersky2016-08-174-4/+29
| | | | | | | | | | | | Turn assertion into test. Without this, neg/tcpoly_overloaded.scala fails.
| * | Add clause for HKApply in TypeAssigner#avoidMartin Odersky2016-08-172-1/+3
|/ /
* | Merge pull request #1434 from dotty-staging/fix-#1430Guillaume Martres2016-08-1738-358/+565
|\ \ | | | | | | Fix #1430: Better error messages for type errors involving type variables
| * | Fix merge conflictMartin Odersky2016-08-171-6/+6
| | |
| * | Don't omit scala. from fullNameString.Martin Odersky2016-08-161-1/+1
| | | | | | | | | | | | | | | | | | | | | 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.
| * | Don't print $ suffixes of module classesMartin Odersky2016-08-161-1/+4
| | | | | | | | | | | | ... when printing using RefinedPrinter. PlainPrinter will still show them.
| * | Don't print REPL prefixes.Martin Odersky2016-08-161-0/+4
| | | | | | | | | | | | | | | This was already disabled when printing types. Now is also disabled when printing fully qualified names.
| * | Don't disambiguate aliasesMartin Odersky2016-08-161-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | Catch exceptions only in i-interpolator.Martin Odersky2016-08-162-6/+2
| | | | | | | | | | | | | | | | | | 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.
| * | Fix readLine in TestREPL to align with Ammonite readerMartin Odersky2016-08-163-4/+86
| | | | | | | | | | | | | | | | | | Needs to read several input lines at once. Enables repl test of new error messages.
| * | New string infterpolatorsMartin Odersky2016-08-1631-349/+420
| | | | | | | | | | | | | | | | | | 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.
| * | Error message for illegal self type (#1424)Martin Odersky2016-08-162-1/+4
| | | | | | | | | | | | Remove debug info from error message.
| * | Suspend interpolating typevars when there are unreported errors.Martin Odersky2016-08-162-6/+40
| | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | Fix #1430: Avoid constrained polyparams in error messageMartin Odersky2016-08-161-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | 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).
* | | Merge pull request #1438 from olafurpg/fix-1437/dotc-error-handlingFelix Mulder2016-08-161-1/+14
|\ \ \ | |/ / |/| | Fix #1437: handle build failure in bin/dotc.
| * | Fix #1437: handle build failure in bin/dotc.Ólafur Páll Geirsson2016-08-021-1/+14
| | |
* | | Merge pull request #1445 from dotty-staging/fix-#1442Dmitry Petrashko2016-08-154-1/+86
|\ \ \ | | | | | | | | Fix #1442: add new phase, SelectStatic
| * | | t4859: update the check file.Dmitry Petrashko2016-08-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The new behaviour is more reasonable. Now the module if forced consistently in both examples. Note that this is deviation from behaviour of scalac.
| * | | SelectStatic: do not promote types-qualifiers.Dmitry Petrashko2016-08-091-1/+1
| | | |
| * | | SelectStatic: retain symbols on overloaded selectsDmitry Petrashko2016-08-091-2/+1
| | | |
| * | | SelectStatic: also normalise TypeApply nodes.Dmitry Petrashko2016-08-091-0/+6
| | | |
| * | | SelectStatic: do not create blocks that are qualifier of select\applyDmitry Petrashko2016-08-091-11/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | Fix SelectStatic: do not lift java statics to free idents.Dmitry Petrashko2016-08-091-1/+3
| | | |
| * | | Fix NoDenotation.owner in SelectStatic.Dmitry Petrashko2016-08-091-3/+3
| | | |
| * | | Test that #1442 is fixed.Dmitry Petrashko2016-08-091-0/+24
| | | |
| * | | Fix #1442: add new phase, SelectStaticDmitry Petrashko2016-08-092-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Merge pull request #1450 from cswinter/elim-toplevel-typeboundGuillaume Martres2016-08-153-4/+9
|\ \ \ \ | |_|_|/ |/| | | Fix #1443: Replace toplevel TypeBounds with Any
| * | | Fix #1443: Replace toplevel TypeBounds with AnyClemens Winter2016-08-153-4/+9
| |/ /
* | | Merge pull request #1414 from dotty-staging/add-array-strawmanodersky2016-08-1414-22/+2602
|\ \ \ | | | | | | | | Add arrays to collection strawman