From 4f15dfa93d8ea1c1066b73be9ba396e7f16af481 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Thu, 10 Nov 2016 14:20:24 +0100 Subject: 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 --- tests/neg/i1647.scala | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 tests/neg/i1647.scala (limited to 'tests/neg/i1647.scala') 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 +} -- cgit v1.2.3