aboutsummaryrefslogtreecommitdiff
path: root/tests/neg/i1647.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-11-10 14:20:24 +0100
committerMartin Odersky <odersky@gmail.com>2016-12-01 13:55:12 +0100
commit4f15dfa93d8ea1c1066b73be9ba396e7f16af481 (patch)
tree64ff657a15713cd01c547a26815144061192cbc8 /tests/neg/i1647.scala
parent2b12868070be50fb70c687bcd8a415acbe398e3e (diff)
downloaddotty-4f15dfa93d8ea1c1066b73be9ba396e7f16af481.tar.gz
dotty-4f15dfa93d8ea1c1066b73be9ba396e7f16af481.tar.bz2
dotty-4f15dfa93d8ea1c1066b73be9ba396e7f16af481.zip
Fix #1647 Evaluate annotation arguments in proper context
Need to evaluate annotation arguments in an expression context, since classes defined in asuch arguments should not be entered into enclosing class. Fixes #1647
Diffstat (limited to 'tests/neg/i1647.scala')
-rw-r--r--tests/neg/i1647.scala4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/neg/i1647.scala b/tests/neg/i1647.scala
new file mode 100644
index 000000000..b6910cc70
--- /dev/null
+++ b/tests/neg/i1647.scala
@@ -0,0 +1,4 @@
+class ann {
+ @ann({ def baz }) // error: missing return type
+ def foo(): Unit
+}