MapTypeMode and properly map builtins

used in JetTypeMapper in JetTypeMapper

* MapTypeMode contains no information not needed by JetTypeMapper
* MapTypeMode has separate VALUE and IMPL values that are needed to compile builtins
This commit is contained in:
Stepan Koltsov
2012-04-07 06:32:18 +04:00
parent d8e86b12aa
commit b38e171812
21 changed files with 290 additions and 165 deletions
@@ -112,9 +112,9 @@ public class TestlibTest extends CodegenTestCase {
DescriptorUtils.addSuperTypes(descriptor.getDefaultType(), allSuperTypes);
for(JetType type : allSuperTypes) {
String internalName = typeMapper.mapType(type).getInternalName();
String internalName = typeMapper.mapType(type, MapTypeMode.IMPL).getInternalName();
if(internalName.equals("junit/framework/Test")) {
String name = typeMapper.mapType(descriptor.getDefaultType()).getInternalName();
String name = typeMapper.mapType(descriptor.getDefaultType(), MapTypeMode.IMPL).getInternalName();
System.out.println(name);
Class<TestCase> aClass = (Class<TestCase>) loader.loadClass(name.replace('/', '.'));
if((aClass.getModifiers() & Modifier.ABSTRACT) == 0