diff options
author | Lukas Rytz <lukas.rytz@epfl.ch> | 2010-05-10 17:16:02 +0000 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@epfl.ch> | 2010-05-10 17:16:02 +0000 |
commit | e6ff7d3557fee8f3d7dcb6355dc218e8eaca13b8 (patch) | |
tree | 0cab157bd5475463e27038cb1bee4d4c35a90c55 | |
parent | d484df935d3d12b5a853cdf2589e0ebd586076af (diff) | |
download | scala-e6ff7d3557fee8f3d7dcb6355dc218e8eaca13b8.tar.gz scala-e6ff7d3557fee8f3d7dcb6355dc218e8eaca13b8.tar.bz2 scala-e6ff7d3557fee8f3d7dcb6355dc218e8eaca13b8.zip |
close #3415.
-rw-r--r-- | src/compiler/scala/tools/nsc/javac/JavaParsers.scala | 2 | ||||
-rw-r--r-- | test/files/jvm/t3415/Hello.java | 3 | ||||
-rw-r--r-- | test/files/jvm/t3415/HelloWorld.scala | 4 |
3 files changed, 8 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/javac/JavaParsers.scala b/src/compiler/scala/tools/nsc/javac/JavaParsers.scala index 92dbc97965..fe46e22654 100644 --- a/src/compiler/scala/tools/nsc/javac/JavaParsers.scala +++ b/src/compiler/scala/tools/nsc/javac/JavaParsers.scala @@ -541,7 +541,7 @@ trait JavaParsers extends JavaScanners { if (parentToken == AT && in.token == DEFAULT) { val annot = atPos(pos) { - New(rootId(nme.AnnotationDefaultATTR.toTypeName), List(List())) + New(Select(scalaDot(newTermName("runtime")), nme.AnnotationDefaultATTR.toTypeName), List(List())) } mods1 = Modifiers(mods1.flags, mods1.privateWithin, annot :: mods1.annotations, mods1.positions) skipTo(SEMI) diff --git a/test/files/jvm/t3415/Hello.java b/test/files/jvm/t3415/Hello.java new file mode 100644 index 0000000000..ae7206453b --- /dev/null +++ b/test/files/jvm/t3415/Hello.java @@ -0,0 +1,3 @@ +public @interface Hello { + String msg() default "hoi"; +} diff --git a/test/files/jvm/t3415/HelloWorld.scala b/test/files/jvm/t3415/HelloWorld.scala new file mode 100644 index 0000000000..53bf55e444 --- /dev/null +++ b/test/files/jvm/t3415/HelloWorld.scala @@ -0,0 +1,4 @@ +object Test extends Application { + @Hello + def foo() { } +} |