Minor, move tests under common directory

This commit is contained in:
Alexander Udalov
2015-02-11 00:01:02 +03:00
parent 32c371dd41
commit c417d984c4
17 changed files with 0 additions and 0 deletions
@@ -0,0 +1,17 @@
val l: Any = {}
fun box(): String {
val enclosingClass = l.javaClass.getEnclosingClass()!!.getName()
if (!enclosingClass.startsWith("_DefaultPackage") || !enclosingClass.contains("lambdaInPackage")) return "enclosing class: $enclosingClass"
val enclosingConstructor = l.javaClass.getEnclosingConstructor()
if (enclosingConstructor != null) return "enclosing constructor found: $enclosingConstructor"
val enclosingMethod = l.javaClass.getEnclosingMethod()
if (enclosingMethod != null) return "enclosing method found: $enclosingMethod"
val declaringClass = l.javaClass.getDeclaringClass()
if (declaringClass != null) return "anonymous function has a declaring class: $declaringClass"
return "OK"
}