aboutsummaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* 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
| | | |
| * | | ADT and Serialization testMartin Odersky2017-01-318-0/+508
| | | | | | | | | | | | | | | | | | | | The test exercises all the improvements made in previous commits of this branch.
* | | | Merge pull request #1941 from dotty-staging/fix/infix-posodersky2017-02-082-0/+11
|\ \ \ \ | | | | | | | | | | Better positions for infix operations
| * | | | Better positions for infix term operations.Guillaume Martres2017-02-051-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Preserving the position of infix operators is useful for IDEs' type-at-point. We also preserve the position of the untyped lhs of right-associative operators, this is useful both for IDEs and for error messages, before: 4 |val x: List[Int] = "foo" :: List(1) | ^ | found: String($1$) | required: Int | After: scala> val x: List[Int] = "foo" :: List(1) -- [E007] Type Mismatch Error: <console> --------------------------------------- 4 |val x: List[Int] = "foo" :: List(1) | ^^^^^ | found: String($1$) | required: Int | Note: It would be even nicer if we displayed "String" instead of "String($1$)" since $1$ is synthetic, this commit does not address this.
| * | | | Represent untyped operators as Ident instead of NameGuillaume Martres2017-02-051-0/+4
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | This has two advantages: - We can distinguish BackquotedIdent from Ident, allowing the user to use a defined "type `&`", see testcase. - We get better positions for the operators. This is useful in IDEs, for example to get the type at point.
* | | | Merge pull request #1953 from dotty-staging/fix-wildapproxodersky2017-02-083-0/+9
|\ \ \ \ | |_|_|/ |/| | | Fix to wildapprox
| * | | Add output check fileMartin Odersky2017-02-081-0/+1
| | | |
| * | | Another test caseMartin Odersky2017-02-071-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Prompted by a discussion on the Scala reddit, this one verified that dotty does not have the problem exhibited in SI-10170. I piggyback on this PR because this does not warrant a separate PR>
| * | | Fix wildApprox functionMartin Odersky2017-02-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | f-bounded-case-class.scala exhibited a StackOverflow in wildApprox before the fixes. The problem was due to F-bounds. Note: wildApprox is performance critical. I ran timed-bootstrap-repeated a couple of times to verify that the changes did not affect runtimes in significant ways. We should also watch out for a slowdown in the benchmark tests.
* | | | Add to test caseMartin Odersky2017-02-082-5/+20
| | | |
* | | | ADT and Serialization testMartin Odersky2017-02-088-0/+508
| |/ / |/| | | | | | | | | | | The test exercises all the improvements made in previous commits of this branch.
* | | Merge pull request #1930 from dotty-staging/fix-#1568odersky2017-02-031-0/+3
|\ \ \ | | | | | | | | Fix #1568 - avoid transforming error trees
| * | | 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 #1928 from dotty-staging/fix-#1569odersky2017-02-022-0/+7
|\ \ \ | |/ / |/| | Fix #1569: Fix logic for by-name parameters of inline methods
| * | Fix #1569: Fix logic for by-name parameters of inline methodsMartin Odersky2017-02-022-0/+7
| | | | | | | | | | | | | | | As #1569 shows, by-name parameters should be treated in the same way as by-value parameters. If the expression is not pure, install a binding.
* | | Merge pull request #1922 from dotty-staging/fix-#1723odersky2017-02-021-0/+8
|\ \ \ | |/ / |/| | Fix-#1723: Avoid private leaks on completion
| * | Fix-#1723: Avoid private leaks on completionMartin Odersky2017-02-011-0/+8
| |/ | | | | | | As #1723 demonstrates, doing this at PostTyper is too late.
* | Merge pull request #1925 from dotty-staging/fix/inner-vcodersky2017-02-022-29/+19
|\ \ | | | | | | Fix #1644: Disallow inner classes in value classes
| * | Fix #1644: Disallow inner classes in value classesGuillaume Martres2017-02-012-29/+19
| | |
* | | Merge pull request #1919 from dotty-staging/fix-#1915Nicolas Stucki2017-02-011-0/+9
|\ \ \ | | | | | | | | Fix #1915 Synthetic function traits need NoInits flag
| * | | Fix #1915 Synthetic function traits need NoInits flagMartin Odersky2017-01-311-0/+9
| | |/ | |/| | | | | | | Fixes #1915.
* | | Merge pull request #1881 from dotty-staging/add-structural-selectodersky2017-02-017-7/+117
|\ \ \ | | | | | | | | 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.
| * | | Add test case for #1866Martin Odersky2017-01-101-0/+5
| | | | | | | | | | | | | | | | The PR also fixes #1866, as shown by this test case.
| * | | Change scheme to use SelectableMartin Odersky2017-01-073-13/+6
| | | | | | | | | | | | | | | | | | | | Use base types instead of implicits. This is more robust in the presence of type abstraction.
| * | | Implement structural type member accessMartin Odersky2017-01-055-7/+108
| | | | | | | | | | | | | | | | New scheme for implementing structural type member access.
* | | | Fix #1916 - fix erasure of xxl closuresMartin Odersky2017-01-311-2/+2
| |/ / |/| | | | | | | | | | | xxl closures need to get the SAM type FunctionXXL as their explicit type field after ersure.
* | | 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.
* | Merge pull request #1896 from dotty-staging/fix/bootstrapGuillaume Martres2017-01-281-0/+5
|\ \ | | | | | | Add sbt-based bootstrap