diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2014-02-12 12:11:40 +0100 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2014-02-12 15:21:15 +0100 |
commit | 609047ba372ceaf06916d3361954bc949a6906ee (patch) | |
tree | 93eceb1b342ea114b4923ef258a9409a054197a9 /test/files/run/t7185.check | |
parent | 98320a6d5947f26e7252b025cf56a0763b39cd07 (diff) | |
download | scala-609047ba372ceaf06916d3361954bc949a6906ee.tar.gz scala-609047ba372ceaf06916d3361954bc949a6906ee.tar.bz2 scala-609047ba372ceaf06916d3361954bc949a6906ee.zip |
typecheck(q"class C") no longer crashes
MemberDefs alone can't be typechecked as is, because namer only names
contents of PackageDefs, Templates and Blocks. And, if not named, a tree
can't be typed.
This commit solves this problem by wrapping typecheckees in a trivial block
and then unwrapping the result when it returns back from the typechecker.
Diffstat (limited to 'test/files/run/t7185.check')
-rw-r--r-- | test/files/run/t7185.check | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/test/files/run/t7185.check b/test/files/run/t7185.check index ebf85b731f..2b4adf36b4 100644 --- a/test/files/run/t7185.check +++ b/test/files/run/t7185.check @@ -24,9 +24,7 @@ tree: reflect.runtime.universe.Apply = scala> {val tb = reflect.runtime.currentMirror.mkToolBox(); tb.typecheck(tree): Any} res0: Any = { - { - $read.O.apply() - } + $read.O.apply() } scala> |