diff options
author | Adriaan Moors <adriaan.moors@epfl.ch> | 2012-05-18 09:46:42 -0700 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@epfl.ch> | 2012-05-18 09:46:42 -0700 |
commit | 6765cb0af5a9f9cedd5c71b052aa963d9d52e8dc (patch) | |
tree | 2de1c9593c456cf95d3f8bd32977797bdd7d6573 /test/files | |
parent | 5639d82cd27d5c86cb5ea27410676935fc6c8635 (diff) | |
parent | 9c6a7ad81bdb632d3da144d58210b5903b86a3e4 (diff) | |
download | scala-6765cb0af5a9f9cedd5c71b052aa963d9d52e8dc.tar.gz scala-6765cb0af5a9f9cedd5c71b052aa963d9d52e8dc.tar.bz2 scala-6765cb0af5a9f9cedd5c71b052aa963d9d52e8dc.zip |
Merge pull request #572 from lrytz/wip/t5544
Fix SI-5544
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/neg/t5544.check | 4 | ||||
-rw-r--r-- | test/files/neg/t5544/Api_1.scala | 8 | ||||
-rw-r--r-- | test/files/neg/t5544/Test_2.scala | 3 | ||||
-rw-r--r-- | test/files/run/t5544.check | 1 | ||||
-rw-r--r-- | test/files/run/t5544/Api_1.scala | 8 | ||||
-rw-r--r-- | test/files/run/t5544/Test_2.scala | 3 |
6 files changed, 27 insertions, 0 deletions
diff --git a/test/files/neg/t5544.check b/test/files/neg/t5544.check new file mode 100644 index 0000000000..d4113935a3 --- /dev/null +++ b/test/files/neg/t5544.check @@ -0,0 +1,4 @@ +Test_2.scala:2: error: value baz is not a member of object Api + Api.baz + ^ +one error found diff --git a/test/files/neg/t5544/Api_1.scala b/test/files/neg/t5544/Api_1.scala new file mode 100644 index 0000000000..77637f440a --- /dev/null +++ b/test/files/neg/t5544/Api_1.scala @@ -0,0 +1,8 @@ +import scala.annotation.StaticAnnotation + +class ann(val bar: Any) extends StaticAnnotation + +object Api { + @ann({def baz = "baz!!"}) + def foo = println("foo") +} diff --git a/test/files/neg/t5544/Test_2.scala b/test/files/neg/t5544/Test_2.scala new file mode 100644 index 0000000000..4c8c99cbc7 --- /dev/null +++ b/test/files/neg/t5544/Test_2.scala @@ -0,0 +1,3 @@ +object Test extends App { + Api.baz +} diff --git a/test/files/run/t5544.check b/test/files/run/t5544.check new file mode 100644 index 0000000000..257cc5642c --- /dev/null +++ b/test/files/run/t5544.check @@ -0,0 +1 @@ +foo diff --git a/test/files/run/t5544/Api_1.scala b/test/files/run/t5544/Api_1.scala new file mode 100644 index 0000000000..b4c92864de --- /dev/null +++ b/test/files/run/t5544/Api_1.scala @@ -0,0 +1,8 @@ +import scala.annotation.StaticAnnotation + +class ann(val bar: Any) extends StaticAnnotation + +object Api { + @ann({def foo = "foo!!"}) + def foo = println("foo") +} diff --git a/test/files/run/t5544/Test_2.scala b/test/files/run/t5544/Test_2.scala new file mode 100644 index 0000000000..285f8959e0 --- /dev/null +++ b/test/files/run/t5544/Test_2.scala @@ -0,0 +1,3 @@ +object Test extends App { + Api.foo +} |