summaryrefslogtreecommitdiff
path: root/test/files/run/t5225_2.check
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2012-02-12 23:07:30 +0100
committerEugene Burmako <xeno.by@gmail.com>2012-02-12 23:07:33 +0100
commit6548dcf12d83e327df2f90048140fb95346b7e95 (patch)
treee20b3b6ce697af665983c3cc510d763a926650c6 /test/files/run/t5225_2.check
parent6b56405cb39b979dccbadd06110e283a254b6150 (diff)
downloadscala-6548dcf12d83e327df2f90048140fb95346b7e95.tar.gz
scala-6548dcf12d83e327df2f90048140fb95346b7e95.tar.bz2
scala-6548dcf12d83e327df2f90048140fb95346b7e95.zip
reifyAnnotations
Annotations are now supported by the reifier: * AnnotationInfos from symbols get transformed back into mods. * AnnotatedTypes are retained and are reified along with AnnotationInfos. Reification is no magic, and reification of annotations especially: * Annotations cannot refer to symbols defined inside the quasiquote. This restriction is due to the fact that we need to erase locally defined symbols before reifying to make subsequent reflective compilations succeed. However, while doing that, we also need to make sure that we don't make resulting ASTs non-compilable by removing essential information. This is tricky, and it more or less works for TypeTrees, but not for annotations that can contain arbitrary ASTs. For more details look into the comments to Reifiers.scala. * Classfile annotations that contain array arguments and are applied to types, i.e. the ones that generate AnnotatedTypes, cannot be reified. This is because of limitations of manifest infrastructure. Typechecking "Array(mirror.LiteralAnnotArg(...))" would require the compiler to produce a manifest for a path-dependent type, which cannot be done now. Review by @odersky.
Diffstat (limited to 'test/files/run/t5225_2.check')
-rw-r--r--test/files/run/t5225_2.check4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/files/run/t5225_2.check b/test/files/run/t5225_2.check
new file mode 100644
index 0000000000..c4f6b4761e
--- /dev/null
+++ b/test/files/run/t5225_2.check
@@ -0,0 +1,4 @@
+{
+ def foo(@new cloneable() x: Int): String = "";
+ ()
+}