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 @@
fun box(): String {
val objectInLambda = {
object : Any () {}
}()
val enclosingMethod = objectInLambda.javaClass.getEnclosingMethod()
if (enclosingMethod?.getName() != "invoke") return "method: $enclosingMethod"
val enclosingClass = objectInLambda.javaClass.getEnclosingClass()!!.getName()
if (!enclosingClass.startsWith("_DefaultPackage\$") || !enclosingClass.endsWith("\$box\$objectInLambda\$1")) return "enclosing class: $enclosingClass"
val declaringClass = objectInLambda.javaClass.getDeclaringClass()
if (declaringClass != null) return "anonymous object has a declaring class"
return "OK"
}