aboutsummaryrefslogtreecommitdiff
path: root/tests/neg
Commit message (Collapse)AuthorAgeFilesLines
* 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
| | | |
* | | | Merge pull request #1717 from dotty-staging/fix-#1688odersky2016-11-161-0/+6
|\| | | | |/ / |/| | Don't allow redefinition of core classes
| * | Don't allow redefinition of core classesMartin Odersky2016-11-101-0/+6
| |/ | | | | | | Fixes #1688.
* | Merge pull request #1666 from dotty-staging/fix-#1653odersky2016-11-163-2/+12
|\ \ | | | | | | Fix #1653: Check "no inherit from final" earlier.
| * | Refactor testMartin Odersky2016-11-072-2/+9
| | | | | | | | | | | | | | | | | | | | | After refactoring, one test (cannot extend final class) shadowed the others, which wer done in a later phase. Splitting in two to get all errors again.
| * | Fix #1653: Check "no inherit from final" earlier.Martin Odersky2016-11-061-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test case is an illegal inheritance from a primitive value class, which makes this an illegal value class. Previously, the error was detected by refchecks, but crashes occured earlier (when generating synthesized methods) or at the same phase block (in extension methods). The problem is avoided by moving the test to Namer. Review by @smarter.
* | | Fix #1662: Add missing case for singletonMartin Odersky2016-11-101-0/+6
| |/ |/| | | | | | | | | Have to handle also SkolemTypes there. Fixes #1662.
* | Fixed #1672: Add regression test.Nicolas Stucki2016-11-081-0/+7
| | | | | | | | This issue was solved by some other fix.
* | Fix #1605: don't inline methods that have errorsFelix Mulder2016-11-071-0/+5
| |
* | Merge pull request #1659 from dotty-staging/fix-#1640Felix Mulder2016-11-062-0/+12
|\ \ | | | | | | Fix #1640: Avoid applications with untyped function parts
| * | Test case for #1641Martin Odersky2016-11-051-0/+8
| | | | | | | | | | | | | | | #1641 compiles under latest master. This test case is there to ensure it stays that way.
| * | Fix #1640: Avoid applications with untyped function partsMartin Odersky2016-11-051-0/+4
| |/ | | | | | | | | Avoid applications with untyped function parts even if program is erroneous. Taking the symbol fails for these applications, which can cause crashes.
* / Disallow wildcard arguments in newMartin Odersky2016-11-051-0/+19
|/ | | | | | These might lead to bad bounds if unchecked. Scalac disallows them also, but with a confusing error message ("class type expected" on the class).
* Reclassified testMartin Odersky2016-11-031-0/+5
| | | | Should be a neg test now.
* Fix #1286: Error on inexistent imports that are not used.Nicolas Stucki2016-10-211-0/+16
| | | | This commit also fixes #1583.
* Fix #1531: Ignore private members when looking for abstract onesMartin Odersky2016-10-141-0/+6
| | | | | | | | Private members do not override abstract ones. So when looking for abstract members we need to search with `nonPrivateMember`, not `member`. Fixes #1531. Review by @smarter.
* Update tests to use new PolyType syntax.Martin Odersky2016-10-122-12/+12
|
* Disallow singleton types in unionsMartin Odersky2016-10-111-0/+6
| | | | | | | | | | | | | For the moment, we do not know how to handle something like 1 | 2 or x.type | y.type correctly. So it's better to disallow these situations until we find a proper solution.
* Adapt testsMartin Odersky2016-10-112-0/+43
|
* Improve positions for MemberDefs using `namePos`Felix Mulder2016-10-105-7/+7
|
* Add inline for valsMartin Odersky2016-10-021-0/+24
| | | | | | | | | | - allow inline as an alternative to final for vals (final is retained for backwards compatibility for now) - allow inline for parameters - check that rhs of inline value has a constant type - check that arguments to inline value parameters have constant type - check that inline members are not deferred - make inline members effectively final
* Add accessibility check for type of newMartin Odersky2016-10-021-1/+0
|
* Fix problem related to accessor generation under separate compilationMartin Odersky2016-10-021-5/+7
| | | | | | | Accessors were multiply generated under separate compilation. To fix this, the resident body of an inlined function is now the same as the inlined body. Both use accessors where necessary. Previously, only the inlined body used accessors.
* Make inline a keywordMartin Odersky2016-10-021-2/+1
| | | | | | | `inline` is now a modifier keyword. To keep disruption tolerable, we still allow `@inline` as an annotation as well. Other uses of `inline` are supported only under `-language:Scala2` and are rewritten to identifiers in backticks.
* Make inline annotation @scala.inline.Martin Odersky2016-10-023-17/+2
| | | | | | | | | | | | | | | | | | Drop @dotty.annotation.inline. This will inline all @inline marked methods in Scala for which a body is known (i.e. that are either compiled in the same run or have Tasty trees available). Option -Yno-inline suppresses inlining. This is needed for the moment because some @inline methods access private members or members that are otherwise inaccessible at the call-site. Also fixes some problems in Inliner - make sure type arguments to inline calls re fully defined - don't forget recursive calls in typeMap - don't forget positions in treeMap - drop dead code dealing with outer.
* Neg test demonstrating inline positions under cross-compilationMartin Odersky2016-10-022-0/+15
|
* Recursive inlining testsMartin Odersky2016-10-021-0/+15
| | | | | pos/power inlines with alomst no extraneous boilerplate. neg/power gives an error that maximal numbers of inlines was exceeded.
* First version of inline schemeMartin Odersky2016-10-021-0/+15
| | | | | To be done: outer accessors To be done: error positions
* Fix #1503 - be careful where to insert an apply.Martin Odersky2016-09-171-0/+14
| | | | | | `apply` nodes should not be inserted in the result parts of a block, if-then-else, match, or try. Instead they should be added to the surrounding statement.
* Merge pull request #1469 from dotty-staging/fix-scala.Dynamicodersky2016-09-1611-0/+172
|\ | | | | Fixes for scala.Dynamic
| * Enable scala.Dynamic pending/untried tests.Nicolas Stucki2016-09-059-0/+147
| |
| * Fix #1468: Add type parameter support for scala.DynamicNicolas Stucki2016-09-052-0/+25
| |
* | Improve error message on empty catch blockFelix Mulder2016-09-151-0/+3
|/
* More tests recategorizedMartin Odersky2016-08-261-0/+20
|
* Test recategorizationMartin Odersky2016-08-261-0/+40
|
* Merge pull request #1456 from dotty-staging/fix-#1444odersky2016-08-213-2/+35
|\ | | | | Fix #1444: Pass implicits to parameterless traits if needed
| * Fix testMartin Odersky2016-08-201-1/+1
| |