use receiver type as owner when calling Java methods
This commit is contained in:
@@ -393,4 +393,11 @@ public class NamespaceGenTest extends CodegenTestCase {
|
||||
main.invoke(null, l);
|
||||
assertEquals(10, l.get(0).intValue());
|
||||
}
|
||||
|
||||
public void testCallMethodDeclaredInSuperclass() throws Exception {
|
||||
loadText("fun foo(sb: StringBuilder) = sb.charAt(0)");
|
||||
final Method main = generateFunction();
|
||||
final StringBuilder sb = new StringBuilder("x");
|
||||
assertEquals('x', ((Character) main.invoke(null, sb)).charValue());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user