git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@8394 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
This commit is contained in:
parent
728d3e7bc6
commit
ffd492a631
|
@ -0,0 +1 @@
|
|||
RUNTIME
|
|
@ -0,0 +1,8 @@
|
|||
object Test {
|
||||
def main(args: Array[String]): Unit = {
|
||||
import java.lang.annotation.Retention;
|
||||
val c = classOf[Retention]
|
||||
val r: Retention = c.getAnnotation(c).asInstanceOf[Retention];
|
||||
System.out.println(r.value)
|
||||
}
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
class Foobar {
|
||||
val foo = "foo";
|
||||
def foo(bar: String): String = foo + bar; // crashes the compiler
|
||||
}
|
Loading…
Reference in New Issue