Skip to content

Requested tests for #2973 fix #5022

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions tests/pos/annotations/MyClass.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,10 @@ class MyClass {
@MyAnnotation(Name="Blah", foBaskaLi = Array(1,2,3))
def method = ???
}

class MyClass2 extends AnyRef @MyAnnotation(Name="Foo", foBaskaLi = Array(1,2,3))

class MyClass3 extends AnyRef @MyAnnotation(Name="Foo", foBaskaLi = Array(1,2,3)) {
@MyAnnotation(Name="Blah", foBaskaLi = Array(1,2,3))
def method = ???
}
10 changes: 10 additions & 0 deletions tests/pos/annotations2.scala
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,13 @@ class A3 {
@CAnn[Int](classOf[Int]) val b3 = null
@CAnn[Int]((1, 2)) val b4 = null
}

class B1 extends AnyRef @BAnn((1, 2, 3))
class B2 extends AnyRef @BAnn((1, 2))
class B3 extends AnyRef @BAnn[Int]((1, 2, 3))
class B4 extends AnyRef @BAnn[Int]((1, 2))

class C1 extends AnyRef @CAnn((1, 2))
class C2 extends AnyRef @CAnn(classOf[Int])
class C3 extends AnyRef @CAnn[Int]((1, 2))
class C4 extends AnyRef @CAnn[Int](classOf[Int])