generate no-arg typeinfo
This commit is contained in:
@@ -23,13 +23,20 @@ public class TypeInfoTest extends CodegenTestCase {
|
||||
assertNotNull(typeInfo);
|
||||
}
|
||||
|
||||
public void testTypeOfOperator() throws Exception {
|
||||
public void testOneArgTypeinfo() throws Exception {
|
||||
loadFile();
|
||||
Method foo = generateFunction();
|
||||
TypeInfo typeInfo = (TypeInfo) foo.invoke(null);
|
||||
assertNotNull(typeInfo);
|
||||
}
|
||||
|
||||
public void testNoArgTypeinfo() throws Exception {
|
||||
loadText("fun foo() = typeinfo.typeinfo<Int>()");
|
||||
Method foo = generateFunction();
|
||||
TypeInfo typeInfo = (TypeInfo) foo.invoke(null);
|
||||
assertSame(TypeInfo.INT_TYPE_INFO, typeInfo);
|
||||
}
|
||||
|
||||
public void testAsSafeOperator() throws Exception {
|
||||
loadText("fun foo(x: Any) = x as? Runnable");
|
||||
Method foo = generateFunction();
|
||||
|
||||
Reference in New Issue
Block a user