aboutsummaryrefslogtreecommitdiff
path: root/tests/neg
Commit message (Collapse)AuthorAgeFilesLines
* Fix #2230: Add regression test.Nicolas Stucki2017-04-121-0/+22
|
* Skolemize arguments to dependent methods as necessary.Martin Odersky2017-04-101-0/+28
| | | | This was missing before, led to errors not being detected.
* Merge pull request #1958 from dotty-staging/add-enumodersky2017-04-061-0/+20
|\ | | | | Add "enum" construct
| * New and updated testsMartin Odersky2017-04-041-3/+3
| |
| * Infer enum type args from type parameter boundsMartin Odersky2017-04-041-1/+12
| | | | | | | | | | | | Infer type arguments for enum paraments from corresponding type parameter bounds. This only works if the type parameter in question is variant and its bound is ground.
| * Fix neg test error countMartin Odersky2017-04-041-1/+1
| | | | | | | | | | Previous expansion caused 3 spurious follow-on errors which are now avoided.
| * Check that cases with type parameters also have an extends clauseMartin Odersky2017-04-041-0/+1
| |
| * Add testsMartin Odersky2017-04-041-0/+8
| |
* | checkNoPrivateLeaks: Do not allow types to refer to leaky aliasesGuillaume Martres2017-04-041-0/+13
|/ | | | | | | | | | | `checkNoPrivateLeaks` can force a lot of things, this lead to hard-to-reproduce issues in unpickling because we called `checkNoPrivateLeaks` on the type parameters of a class before anything in the class was indexed. We fix this by making sure that `checkNoPrivateLeaks` never transforms type symbols, only term symbols, therefore we can unpickle type parameters without forcing too many things. tests/neg/leak-type.scala illustrates the new restriction that this necessitates.
* Fix #2151: don't die for wrong number of typeargs appliedFelix Mulder2017-03-311-0/+6
|
* Move varargs tests to top-level pos and negFelix Mulder2017-03-296-3/+3
|
* Add neg testing capability to ParallelTestingFelix Mulder2017-03-292-2/+2
|
* Fix varargs in methods and constructors (#2135)Igor Mielientiev2017-03-225-0/+15
| | | | | | | * Fix varargs in methods (Issue: #1625) * Fix minor comments * Change varargs parameter message * Fix failed test, fix case for constructor
* Fixed #2086: Add tests for issue that has already been fixed.Nicolas Stucki2017-03-202-0/+9
|
* Fix bug in typechecking super prefix with invalid enclosing classAbel Nieto2017-03-171-0/+3
| | | | | | | | | | | | | | | | | When typechecking class A { C.super.foo() } If C isn't an enclosing class, the compiler was throwing because of an unguarded pattern match. Fix the issue by checking for ErrorType. Tested: Verified that the example above no longer throws. Added a test.
* Merge pull request #2096 from dotty-staging/fix-i2051Dmitry Petrashko2017-03-151-0/+2
|\ | | | | Fix #2051: allow override T with => T or ()T
| * add neg test for #2051liu fengyun2017-03-141-0/+2
| |
* | Merge pull request #2079 from dotty-staging/depmeth2odersky2017-03-141-0/+13
|\ \ | | | | | | Allow inter-parameter dependencies
| * | Test casesMartin Odersky2017-03-141-0/+13
| |/
* / add test for #1706liu fengyun2017-03-141-0/+3
|/ | | | The bug is already fixed in PR #1724 while fixing another issue
* Merge pull request #2080 from dotty-staging/fix#-2066odersky2017-03-121-0/+27
|\ | | | | Fix #2066: Don't qualify private members in SelectionProto's...
| * Alternative fix of #2066.Martin Odersky2017-03-121-0/+27
| | | | | | | | | | Now we never match `? { name: T }` with types that have only a private `name` member. This is what scalac does, too.
* | Fix #1569: Improve avoidance algorithmMartin Odersky2017-03-121-9/+0
|/ | | | | | The essential change is that we do not throw away more precise info of the avoided type if the expected type is fully defined.
* Disallow subtypes of Function1 acting as implicit conversionsMartin Odersky2017-03-081-0/+7
| | | | | | | | | | The new test `falseView.scala` shows the problem. We might create an implicit value of some type that happens to be a subtype of Function1. We might now expect that this gives us an implicit conversion, this is most often unintended and surprising. See the comment in Implicits#discardForView for a discussion why we picked the particular scheme implemented here.
* Drop named type parameters in classesMartin Odersky2017-03-041-0/+12
| | | | | | | | | | | | | Drop the [type T] syntax, and what's associated to make it work. Motivation: It's an alternative way of doing things for which there seems to be little need. The implementation was provisional and bitrotted during the various iterations to introduce higher-kinded types. So in the end the complxity-cost for language and compiler was not worth the added benefit that [type T] parameters provide. Noe that we still accept _named arguments_ [A = T] in expressions; these are useful for specifying some parameters and letting others be inferred.
* Merge pull request #2031 from dotty-staging/fix-#2030odersky2017-03-031-0/+5
|\ | | | | Fix #2030: Don't chain implicit conversions
| * Don't chain implicit conversionsMartin Odersky2017-02-271-0/+5
| | | | | | | | | | | | | | When inferring a view, we are not allowed to use another implicit conversion to adapt its result. Fixing this revealed another problem where we have to re-enable implicit conversions when pre-typing arguments in overloading resolution.
* | Allow abstract type members in objects.Nicolas Stucki2017-03-012-2/+3
| |
* | Fix #2033: Improve handling of unresolved overloaded argumentsMartin Odersky2017-02-271-0/+21
|/
* Better error messages for missing type of recursive definitionsMartin Odersky2017-02-231-0/+6
|
* Merge pull request #2014 from dotty-staging/fix-#2002odersky2017-02-222-0/+27
|\ | | | | Fix #2000: Make implicit and non-implicit functions incomparable
| * Fix #2000: Make implicit and non-implicit functions incomparable with <:<Martin Odersky2017-02-212-0/+27
| | | | | | | | | | | | | | | | | | Implicit and non-implicit functions are incomparable with <:<, but are treated as equivalent with `matches`. This means implicit and non-implicit functions of the same types override each other, but RefChecks will give an error because their types are not subtypes. Also contains a test for #2002.
* | Merge pull request #1997 from dotty-staging/fix-#1992odersky2017-02-222-0/+16
|\ \ | | | | | | Fix off-by-one error in forward reference checking
| * | Fixed #2005: Add test case.Nicolas Stucki2017-02-211-0/+7
| | |
| * | Fix off-by-one error in forward reference checkingMartin Odersky2017-02-181-0/+9
| | |
* | | Merge pull request #1984 from dotty-staging/fix-#1747-v2odersky2017-02-211-0/+3
|\ \ \ | | | | | | | | Fix #1747: Improve error message for Scala/Java type mismatch
| * | | Fix test case^2Martin Odersky2017-02-151-2/+2
| | | |
| * | | Fix test caseMartin Odersky2017-02-151-1/+1
| | | |
| * | | Tweak printing of polymrophic methodsMartin Odersky2017-02-141-0/+3
| |/ / | | | | | | | | | Omit the `=>' if a PolyType has a MethodType as result type.
* | / Don't inline when errors are detectedMartin Odersky2017-02-211-0/+10
| |/ |/| | | | | | | | | | | | | | | Inlining is only well-defined if the body to inline does not have any errors. We therefore check for errors before we perform any transformation of trees related to inlining. The error check is global, i.e. we stop on any error not just on errors in the code to be inlined. This is a safe approximation, of course.
* | Merge pull request #1987 from dotty-staging/topic/remove-unused-flagsFelix Mulder2017-02-201-2/+0
|\ \ | | | | | | Remove unused flags
| * | Make non-existent compiler options emit warnings instead of failingFelix Mulder2017-02-201-2/+0
| |/
* / Disable tests that require scala-compilerGuillaume Martres2017-02-181-37/+0
|/ | | | This is necessary if we ever want to get rid of our dependency on scala-compiler
* Merge pull request #1931 from dotty-staging/fix-#1501Guillaume Martres2017-02-132-1/+29
|\ | | | | Fix #1501 - Check trait inheritance condition
| * Add test scenariosMartin Odersky2017-02-081-0/+10
| |
| * Update test caseMartin Odersky2017-02-081-1/+1
| |
| * Fix #1501 - Check trait inheritance conditionMartin Odersky2017-02-081-0/+18
| | | | | | | | | | We need to check a coherence condition between the superclass of a trait and the superclass of an inheriting class or trait.
* | Merge pull request #1921 from dotty-staging/fix-#1907odersky2017-02-083-2/+36
|\ \ | |/ |/| Fix #1907: Improve error message
| * Update test fileMartin Odersky2017-02-011-0/+22
| | | | | | | | Updated with SI issues reported by Jason
| * Disallow taking a class tag of Nothing or Null.Martin Odersky2017-02-013-2/+14
| | | | | | | | | | | | | | | | It seems in most cases this leads to weird behavior and cause confusing error messages later. It also means we cannot create an Array[Nothing], except by passing the classtag explicitly.