-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename
InlineCopier
to ConservativeTreeCopier
, use it in `TypeMap…
- Loading branch information
Showing
5 changed files
with
58 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// See also tests/pos/annot-21595.scala | ||
|
||
class local(predicate: Int) extends annotation.StaticAnnotation | ||
|
||
def failing1(x: Int, z: Int @local(x + x)) = () |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
class dummy(b: Any) extends annotation.StaticAnnotation | ||
|
||
class X: | ||
def foo() = 1 | ||
def bar() = 2 | ||
def eq(x: X) = true | ||
def id(): this.type = this | ||
|
||
class Y extends X: | ||
override def bar() = 2 | ||
override def eq(x: X) = true | ||
|
||
def f(x: Int) = x | ||
def g(x: String) = x | ||
def g(x: Int) = x | ||
|
||
object AnnotationTests: | ||
def foo1(elem: Int, bla: Int @dummy(Array(elem))) = bla | ||
def foo2(elem: X, bla: Int @dummy(elem.foo())) = bla | ||
def foo3(elem: Y, bla: Int @dummy(elem.foo())) = bla | ||
def foo4(elem: X, bla: Int @dummy(elem.bar())) = bla | ||
def foo5(elem: Y, bla: Int @dummy(elem.bar())) = bla | ||
def foo6(elem: X, bla: Int @dummy(elem.eq(X()))) = bla | ||
def foo7(elem: Y, bla: Int @dummy(elem.eq(Y()))) = bla | ||
def foo8(elem: X, bla: Int @dummy(elem.id().foo())) = bla | ||
def foo9(elem: Y, bla: Int @dummy(elem.id().foo())) = bla | ||
def foo10(elem: Int, bla: Int @dummy(f(elem))) = bla | ||
def foo11(elem: Int, bla: Int @dummy(g(elem))) = bla | ||
def foo12(elem: Int, bla: Int @dummy(0 == elem)) = bla | ||
def foo13(elem: Int, bla: Int @dummy(elem == 0)) = bla |