aboutsummaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | Merge pull request #2015 from dotty-staging/add-pf-overloadingodersky2017-02-231-0/+41
|\ \ \ \ | |/ / / |/| | | Add overloading support for case-closures
| * | | Extend argument pretyping to case-closuresMartin Odersky2017-02-211-5/+5
| | | |
| * | | Add overloading support for case-closuresMartin Odersky2017-02-211-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | case-closures (which are represented as Match nodes) have a known arity just like other function literals. So shape analysis for overloading resolution should apply to them as well.
* | | | Merge pull request #2021 from dotty-staging/fix-#2020Guillaume Martres2017-02-221-0/+8
|\ \ \ \ | | | | | | | | | | Fix #2020: Only the first parameters of a case class are caseaccessors
| * | | | Fix #2020: Only the first parameters of a case class are caseaccessorsMartin Odersky2017-02-221-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | Only the parameters in the first parameter list of a case class should get the `CaseAccessor` flag. Fixes #2020.
* | | | | Fix #2009: Fix placeholder params logic for lambdas (#2019)odersky2017-02-221-0/+9
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix #2009: Fix placeholder params logic for lambdas Logic was missing placeholders in rhs of lambdas. * Add comment * Fix typo
* | | | 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 #1974 from dotty-staging/fix/ctx-captureodersky2017-02-211-1/+1
|\ \ \ \ \ | | | | | | | | | | | | Avoid accidental captures of Context
| * | | | | typedApply: Avoid using incorrect context in tryEitherGuillaume Martres2017-02-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the following code accidentally used the implicit Context parameter of `typedApply`: tryEither { implicit ctx => typedOpAssign
* | | | | | 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.
* | | | | | | Merge pull request #2013 from dotty-staging/fix-#2006Nicolas Stucki2017-02-211-0/+10
|\ \ \ \ \ \ \ | |_|_|_|_|/ / |/| | | | | | Don't inline when errors are detected
| * | | | | | 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 #1996 from dotty-staging/fix-#1990odersky2017-02-216-0/+105
|\ \ \ \ \ \ | |/ / / / / |/| | | | | Fix #1990: Handle inlining where this proxies change types
| * | | | | Harden outer proxy computation of inlined codeMartin Odersky2017-02-192-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It turns out that we simply cannot do reliable outer path computation that fills in the right hand sides of this-proxies from the types of these proxies. As-seen-from logic can mangle the types of proxies enough to scramble the necessary information. What we now do instead is simply count: We record the number of outer accesses to an outer this in inlineable code, and do the same number of outer accesses when computing the proxy.
| * | | | | Fix sorting of accessed this-proxiesMartin Odersky2017-02-191-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They are sorted according to the nesting depth of the classes they represent. This is no necessarily the same as the nesting level of the symbols of the proxy classes. i1990a.scala shows an example where the two differ.
| * | | | | Bonus test: builder patternMartin Odersky2017-02-182-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This shows that the builder pattern can be expressed with implicit function types.
| * | | | | Fix #1990: Handle case where inlining changes class of outerMartin Odersky2017-02-181-0/+12
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new situation in the test was that outer of the inlined method was `A` but it's as seen from type is a subtype `B`. We need two fixes: - Ignore outerSelects in TreeChecker. These are treated as having fixed symbols. - Adapt the outer-path logic to deal with code that's moved to another context.
* | | | | 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
| |/ / /
* | | | Merge pull request #1989 from dotty-staging/remove/scalac-testsGuillaume Martres2017-02-189-0/+0
|\ \ \ \ | |_|_|/ |/| | | Disable tests that require scala-compiler
| * | | Disable tests that require scala-compilerGuillaume Martres2017-02-189-0/+0
| |/ / | | | | | | | | | This is necessary if we ever want to get rid of our dependency on scala-compiler
* | | Fix binding of x @ (e: T) in ClassTag-based patmatGuillaume Martres2017-02-171-0/+9
| | | | | | | | | | | | | | | | | | We cannot assume that the untyped rhs of the bind is a `Typed` tree, with extractors it might be an `Apply` node, and in general it might also be a `Parens` node.
* | | Fix #1991: Use classtag where available in unapplyMartin Odersky2017-02-171-0/+20
|/ /
* | Fix #1976: Hack to support scala.xml's $scope (#1977)odersky2017-02-141-0/+4
| | | | | | | | | | | | This is a gross hack to support the need for a $scope binding when XML literals are created. It should go away once we phase out XML literals. A library-based solution should use implicits instead.
* | Fix #1975: Align valdefs and for expressions for patternsMartin Odersky2017-02-141-0/+5
|/ | | | | | | | val definitions and for expressions both distinguish whether something is a pattern or a variable binding. They no do it the same way: `ident` or an `ident: type` is a variable binding, everything else is a pattern. Previously, capitalized idents were considered as bindings in valdefs but as pattern in fors.
* Ennru forward reference error (#1973)Enno2017-02-141-0/+7
| | | | | | | | | | * Change 'forward reference extending over the definition' to Message * Change 'forward reference extending over the definition' to Message * pesky file should not be included * Change 'forward reference extending over the definition' to Message (test case)
* 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 #1951 from dotty-staging/fix-1484Felix Mulder2017-02-138-0/+121
|\ \ | | | | | | fix #1484: position of while incorrect in debug
| * | add more debug files to the testsliu fengyun2017-02-106-0/+87
| | |
| * | add debug for ifliu fengyun2017-02-101-0/+20
| | |
| * | fix #1484: position of while incorrect in debugliu fengyun2017-02-101-0/+14
| | |
* | | Merge pull request #1969 from dotty-staging/fix/annot-funGuillaume Martres2017-02-131-0/+1
|\ \ \ | | | | | | | | Fix parsing annotation on function type
| * | | Fix parsing annotation on function typeGuillaume Martres2017-02-121-0/+1
| |/ /
* / / Change 'overrides nothing' to report via Message (see #1965) (#1968)Enno2017-02-121-0/+17
|/ / | | | | | | | | | | * Change 'overrides nothing' to report via Message, split into two different messages * Change 'overrides nothing' to report via Message, split into two different messages
* | Merge pull request #1936 from dotty-staging/fix-1916-on-implicit-functionsodersky2017-02-082-0/+39
|\ \ | | | | | | Fix #1916: fix erasure of implicit xxl closures
| * | Fix #1916: fix erasure of implicit xxl closuresNicolas Stucki2017-02-032-0/+39
| | | | | | | | | | | | This commit extends the fix done in #1920 to implicit closures.
* | | Merge pull request #1921 from dotty-staging/fix-#1907odersky2017-02-086-7/+41
|\ \ \ | | | | | | | | 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-016-7/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | Add to test caseMartin Odersky2017-01-312-5/+20
| | | |