Converted JetScope to Kotlin

This commit is contained in:
Valentin Kipyatkov
2014-10-28 12:09:57 +03:00
parent c26c8f0a84
commit c2a3fde969
21 changed files with 98 additions and 123 deletions
@@ -67,7 +67,7 @@ public class MyDeclarations(
val matcher = INTEGER_VALUE_TYPE_PATTERN.matcher(name)
if (matcher.find()) {
val number = matcher.group(1)!!
return JetTypeImpl(Annotations.EMPTY, IntegerValueTypeConstructor(number.toLong()), false, listOf(), JetScope.EMPTY)
return JetTypeImpl(Annotations.EMPTY, IntegerValueTypeConstructor(number.toLong()), false, listOf(), JetScope.Empty)
}
return typeResolver.resolveType(
scopeToResolveTypeParameters, JetPsiFactory(project).createType(name),
@@ -87,7 +87,7 @@ public class TypeSubstitutorTest extends KotlinTestWithEnvironment {
JetScope topLevelDeclarations = module.getPackage(FqName.ROOT).getMemberScope();
ClassifierDescriptor contextClass = topLevelDeclarations.getClassifier(Name.identifier("___Context"));
assert contextClass instanceof ClassDescriptor;
WritableScopeImpl typeParameters = new WritableScopeImpl(JetScope.EMPTY, module, RedeclarationHandler.THROW_EXCEPTION,
WritableScopeImpl typeParameters = new WritableScopeImpl(JetScope.Empty.INSTANCE$, module, RedeclarationHandler.THROW_EXCEPTION,
"Type parameter scope");
for (TypeParameterDescriptor parameterDescriptor : contextClass.getTypeConstructor().getParameters()) {
typeParameters.addClassifierDescriptor(parameterDescriptor);