aboutsummaryrefslogtreecommitdiff
path: root/tests/neg
Commit message (Collapse)AuthorAgeFilesLines
...
* | Fix #1568 - avoid transforming error treesMartin Odersky2017-02-021-0/+3
| | | | | | | | | | If a tree has type error, subtrees may not have an assigned type. Therefore we should avoid transforming such trees.
* | Merge pull request #1925 from dotty-staging/fix/inner-vcodersky2017-02-021-0/+19
|\ \ | | | | | | Fix #1644: Disallow inner classes in value classes
| * | Fix #1644: Disallow inner classes in value classesGuillaume Martres2017-02-011-0/+19
| | |
* | | Merge pull request #1881 from dotty-staging/add-structural-selectodersky2017-02-012-7/+18
|\ \ \ | |_|/ |/| | Implement structural type member access
| * | Disallow polymorphic refinements in stuctural types.Martin Odersky2017-01-281-0/+11
| | | | | | | | | | | | We can't handle them with the proposed scheme. I made a note in #1886.
| * | Implement structural type member accessMartin Odersky2017-01-051-7/+7
| | | | | | | | | | | | New scheme for implementing structural type member access.
* | | Fix #1750: Handle illegal class overrides betterMartin Odersky2017-01-296-9/+28
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Illegal class overrides are fundamentally at odds with the way dotty represents types and therefore can cause lots of low-level problems. Two measures in this commit First, we detect direct illegal class overrides on completion instead of during RefChecks. Break the override by making the previously overriding type private. This fixes i1750.scala, but still fails for indirect overrides between two unrelated outer traits/classes that are inherited by the same class or trait. We fix this by catching the previously thrown ClassCastException in both ExtractAPI and RefChecks. Test case for indirect overrides is in i1750a.scala.
* | Improve error position and drop second error since it is prunedJonathan Brachthäuser2017-01-081-1/+1
|/
* Merge pull request #1850 from dotty-staging/fix-#1845odersky2016-12-281-0/+3
|\ | | | | Fix #1845: Survive illegal this-type prefixes
| * Annotate other error line in testMartin Odersky2016-12-261-1/+1
| |
| * Add // error to neg testMartin Odersky2016-12-221-1/+1
| |
| * Fix #1845: Survive illegal this-type prefixesMartin Odersky2016-12-221-0/+3
| |
* | Move test into the right directoryMartin Odersky2016-12-261-0/+9
|/
* Add neg test for multiversal eq Nullable fixFelix Mulder2016-12-191-0/+7
|
* Make errors are not swept under the carpetMartin Odersky2016-12-171-0/+21
| | | | | | | | | Typer#ensureReported's comment outlines an example where errors could go unreported, resulting in error trees after typer without any reported error messages. This commit makes sure that at least one error is reported if a tree node has an error type. Fixes #1802.
* Merge pull request #1813 from dotty-staging/fix-#1806Dmitry Petrashko2016-12-161-0/+7
|\ | | | | Fix #1806: Define outer accessors at the right phase
| * Test caseMartin Odersky2016-12-151-0/+7
| |
* | Merge pull request #1785 from dotty-staging/fix-#1784odersky2016-12-151-0/+7
|\ \ | | | | | | Fix #1784: allow to omit types for local implicit vals
| * | Fix neg test caseMartin Odersky2016-12-121-1/+1
| | | | | | | | | | | | Needed an // error annotation
| * | Better diagnosis for cyclic references caused by implicit searchMartin Odersky2016-12-121-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | Since we now allow to drop the explicit type of a local implicit val it can happen that this causes a cyclic reference, namely when the typechecking of the right-hand side involves an implicit search. It's unpractical and fragile to avoid this. Instead we give now a nice error message explaining the problem and how to fix it in source code.
* | | Merge pull request #1682 from dotty-staging/vclassodersky2016-12-153-1/+3
|\ \ \ | | | | | | | | Fix checks related to value classes
| * | | fix test i705-inner-value-class2.scalaliu fengyun2016-11-241-1/+1
| | | |
| * | | fix failing neg testsliu fengyun2016-11-242-2/+2
| | | |
| * | | fix #1642: disallow value classe wrapping value classliu fengyun2016-11-242-1/+2
| | | |
| * | | fix #1670: move the check of value class to typerliu fengyun2016-11-241-0/+1
| | | |
* | | | Merge pull request #1780 from dotty-staging/fix-i1779odersky2016-12-151-0/+13
|\ \ \ \ | | | | | | | | | | fix #1779: support $_ and $_id in interpolated string
| * | | | only allow $_ in patternsliu fengyun2016-12-121-0/+13
| | |/ / | |/| |
* | | | More tests and other odds and endMartin Odersky2016-12-141-0/+20
| |_|/ |/| | | | | | | | | | | | | | - Add tests that work to pos/neg, tests that don't work yet to pending/pos/neg. - Also, change .gitignore to allow for a local directory. - Also add a draft page to the docs.
* | | Fix #1786: support use package object in fun callliu fengyun2016-12-131-0/+17
|/ /
* | Merge pull request #1658 from dotty-staging/fix-#1639odersky2016-12-031-0/+10
|\ \ | | | | | | Fix #1639: Changes around implicits and apply methods
| * | Avoid inserting multiple .apply's.Martin Odersky2016-11-241-0/+10
| |/ | | | | | | | | | | This can lead to stackoverflow, as i1639.scala shows. Fixes #1639.
* | Additional test caseMartin Odersky2016-12-011-0/+2
| | | | | | | | This PR also fixes #1649
* | Fix #1647 Evaluate annotation arguments in proper contextMartin Odersky2016-12-011-0/+4
| | | | | | | | | | | | | | | | Need to evaluate annotation arguments in an expression context, since classes defined in asuch arguments should not be entered into enclosing class. Fixes #1647
* | New phase for entering annotationsMartin Odersky2016-12-011-0/+5
| | | | | | | | | | | | If we want to do annotation macros right, we need to add annotations before completing definitions. This commit achieves that by adding a new "phase" between index and typecheck.
* | Renamed test file to give correct issue numberMartin Odersky2016-11-241-0/+0
| |
* | More robust scheme for taking start/end of positions when parsingMartin Odersky2016-11-241-0/+24
|/ | | | | | | Some trees, which do not consume input have unassigned positions (so that they can fit in whatever range they are integrated). It's therefore risky to take the start or end of a parsed tree's position. This commit guards against the case where the position of the tree does not exist.
* checkNoPrivateLeaks: handle defs in local classesGuillaume Martres2016-11-221-0/+9
| | | | | | The access boundary of a def in a local class is the owner of that class, previously it was set to the access boundary of the owner of the class instead.
* checkNoPrivateLeaks: handle references to companion membersGuillaume Martres2016-11-221-0/+7
| | | | | | | | | | | Previously Outer2#Inner#foo failed to compile with: ``` non-private method foo refers to private value x in its type signature ``` This should compile because the boundary of `foo` is `class Outer2` and the boundary of `x` is `object Outer2`. This commit fixes this by also considering the linked boundary in `checkNoPrivateLeaks`.
* Merge pull request #1634 from dotty-staging/change-tasty-pos-ctdodersky2016-11-211-1/+1
|\ | | | | Towards correct positions in TASTY types
| * Make test more robustMartin Odersky2016-11-111-1/+1
| | | | | | | | | | | | Pick a less common name for the missing identifier. Depending on my classpath I sometimes got `x is not a package` as an additional error for this one.
* | fix #1648: mark companion object for java.lang.Object as non-existentliu fengyun2016-11-181-0/+1
| |
* | Merge pull request #1722 from dotty-staging/topic/fix#1708odersky2016-11-172-0/+12
|\ \ | | | | | | Fix #1708: duplicate symbols in package
| * | Annotate error in test not revealed before prev commitFelix Mulder2016-11-171-1/+1
| | |
| * | Unlink type when entering clashing packageFelix Mulder2016-11-172-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | Here we unlink the existing type that clashes with the package to be entered into the symbol table, issue an error and the proceed to enter the rest of the symbols. My concern with this approach is what happens during typechecking if other things reference the unlinked type.
* | | Merge pull request #1720 from dotty-staging/fix-i1701odersky2016-11-172-1/+6
|\ \ \ | | | | | | | | fix #1701: disqualify package name in type name resolution
| * | | fix neg test i1701.scalaliu fengyun2016-11-171-2/+4
| | | |
| * | | fix failing testliu fengyun2016-11-161-1/+1
| | | |
| * | | add tests for #1701liu fengyun2016-11-161-0/+3
| |/ /
* | | Merge pull request #1718 from dotty-staging/fix-#1703odersky2016-11-171-0/+5
|\ \ \ | | | | | | | | Fix #1703
| * | | Move test to neg positionMartin Odersky2016-11-161-0/+5
| | | |