Deprecated 'INSTANCE$' replaced with 'INSTANCE'

This commit is contained in:
Michael Bogdanov
2015-12-24 10:36:13 +03:00
parent 80fd9e3cbb
commit aeb6486473
98 changed files with 187 additions and 187 deletions
@@ -351,12 +351,12 @@ public abstract class AbstractDiagnosticsTest extends BaseDiagnosticsTest {
@NotNull
protected TargetPlatform getPlatform() {
return JvmPlatform.INSTANCE$;
return JvmPlatform.INSTANCE;
}
@NotNull
protected ModuleDescriptorImpl createModule(@NotNull String moduleName, @NotNull StorageManager storageManager) {
return TargetPlatformKt.createModule(JvmPlatform.INSTANCE$, Name.special(moduleName), storageManager);
return TargetPlatformKt.createModule(JvmPlatform.INSTANCE, Name.special(moduleName), storageManager);
}
@NotNull
@@ -76,7 +76,7 @@ public abstract class AbstractDiagnosticsTestWithJsStdLib extends AbstractDiagno
@NotNull
@Override
protected ModuleDescriptorImpl createModule(@NotNull String moduleName, @NotNull StorageManager storageManager) {
return TargetPlatformKt.createModule(JsPlatform.INSTANCE$, Name.special(moduleName), storageManager);
return TargetPlatformKt.createModule(JsPlatform.INSTANCE, Name.special(moduleName), storageManager);
}
@NotNull
@@ -104,6 +104,6 @@ public abstract class AbstractDiagnosticsTestWithJsStdLib extends AbstractDiagno
@NotNull
@Override
protected TargetPlatform getPlatform() {
return JsPlatform.INSTANCE$;
return JsPlatform.INSTANCE;
}
}
@@ -131,7 +131,7 @@ public class CodegenTestFiles {
Object value;
KotlinType jetType;
KotlinBuiltIns builtIns = JvmPlatform.INSTANCE$.getBuiltIns();
KotlinBuiltIns builtIns = JvmPlatform.INSTANCE.getBuiltIns();
if (type.equals("kotlin.String")) {
value = valueString;
jetType = builtIns.getStringType();
@@ -37,7 +37,7 @@ public class ScriptGenTest extends CodegenTestCase {
private static final KotlinScriptDefinition FIB_SCRIPT_DEFINITION =
new TestScriptDefinition(
".lang.kt",
singletonList(new ScriptParameter(Name.identifier("num"), JvmPlatform.INSTANCE$.getBuiltIns().getIntType()))
singletonList(new ScriptParameter(Name.identifier("num"), JvmPlatform.INSTANCE.getBuiltIns().getIntType()))
);
private static final KotlinScriptDefinition NO_PARAM_SCRIPT_DEFINITION =
new TestScriptDefinition(
@@ -58,7 +58,7 @@ public abstract class AbstractCompileJavaAgainstKotlinTest extends TestCaseWithT
options.setVerbose(true);
options.setExcludedAnnotationClasses(Collections.singleton(new FqName(Retention.class.getName())));
options.setModifiers(DescriptorRendererModifier.ALL);
return Unit.INSTANCE$;
return Unit.INSTANCE;
}
}
)
@@ -145,7 +145,7 @@ public abstract class ExpectedResolveData {
}
public final void checkResult(BindingContext bindingContext) {
KotlinBuiltIns builtIns = JvmPlatform.INSTANCE$.getBuiltIns();
KotlinBuiltIns builtIns = JvmPlatform.INSTANCE.getBuiltIns();
Set<PsiElement> unresolvedReferences = Sets.newHashSet();
for (Diagnostic diagnostic : bindingContext.getDiagnostics()) {
@@ -54,7 +54,7 @@ public class ExpectedResolveDataUtil {
}
public static Map<String, DeclarationDescriptor> prepareDefaultNameToDescriptors(Project project, KotlinCoreEnvironment environment) {
KotlinBuiltIns builtIns = JvmPlatform.INSTANCE$.getBuiltIns();
KotlinBuiltIns builtIns = JvmPlatform.INSTANCE.getBuiltIns();
Map<String, DeclarationDescriptor> nameToDescriptor = new HashMap<String, DeclarationDescriptor>();
nameToDescriptor.put("kotlin::Int.plus(Int)", standardFunction(builtIns.getInt(), "plus", project, builtIns.getIntType()));
@@ -135,7 +135,7 @@ public class ExpectedResolveDataUtil {
ModuleDescriptorImpl emptyModule = KotlinTestUtils.createEmptyModule();
ContainerForTests container = InjectionKt.createContainerForTests(project, emptyModule);
emptyModule.setDependencies(emptyModule);
emptyModule.initialize(PackageFragmentProvider.Empty.INSTANCE$);
emptyModule.initialize(PackageFragmentProvider.Empty.INSTANCE);
LexicalScopeImpl lexicalScope = new LexicalScopeImpl(ImportingScope.Empty.INSTANCE, classDescriptor, false,
classDescriptor.getThisAsReceiverParameter(),
@@ -63,7 +63,7 @@ public abstract class AbstractAnnotationDescriptorResolveTest extends KotlinLite
options.setVerbose(true);
options.setNameShortness(NameShortness.SHORT);
options.setModifiers(DescriptorRendererModifier.ALL);
return Unit.INSTANCE$;
return Unit.INSTANCE;
}
}
);
@@ -74,7 +74,7 @@ public class LoadBuiltinsTest extends KotlinTestWithEnvironment {
options.setVerbose(true);
options.setPrettyFunctionTypes(false);
options.setModifiers(DescriptorRendererModifier.ALL);
return Unit.INSTANCE$;
return Unit.INSTANCE;
}
}
)
@@ -104,13 +104,13 @@ public class LoadBuiltinsTest extends KotlinTestWithEnvironment {
private static PackageFragmentDescriptor createBuiltInsPackageFragment() {
LockBasedStorageManager storageManager = new LockBasedStorageManager();
ModuleDescriptorImpl builtInsModule = new ModuleDescriptorImpl(
Name.special("<built-ins module>"), storageManager, ModuleParameters.Empty.INSTANCE$, DefaultBuiltIns.getInstance()
Name.special("<built-ins module>"), storageManager, ModuleParameters.Empty.INSTANCE, DefaultBuiltIns.getInstance()
);
PackageFragmentProvider packageFragmentProvider = createBuiltInPackageFragmentProvider(
storageManager, builtInsModule, BUILT_INS_PACKAGE_FQ_NAMES,
new BuiltInFictitiousFunctionClassFactory(storageManager, builtInsModule),
AdditionalSupertypes.None.INSTANCE$,
AdditionalSupertypes.None.INSTANCE,
new Function1<String, InputStream>() {
@Override
public InputStream invoke(String path) {
@@ -281,7 +281,7 @@ public class StorageManagerTest extends TestCase {
new Function1<String, Unit>() {
@Override
public Unit invoke(String s) {
return Unit.INSTANCE$;
return Unit.INSTANCE;
}
}
);
@@ -317,7 +317,7 @@ public class StorageManagerTest extends TestCase {
public Unit invoke(String s) {
counter.inc();
assertEquals("tolerant", s);
return Unit.INSTANCE$;
return Unit.INSTANCE;
}
}
);
@@ -346,7 +346,7 @@ public class StorageManagerTest extends TestCase {
public Unit invoke(Collection<String> strings) {
counter.inc();
strings.add("postComputed");
return Unit.INSTANCE$;
return Unit.INSTANCE;
}
}
);
@@ -372,7 +372,7 @@ public class StorageManagerTest extends TestCase {
public Unit invoke(Collection<String> strings) {
counter.inc();
strings.add("postComputed");
return Unit.INSTANCE$;
return Unit.INSTANCE;
}
}
);
@@ -405,7 +405,7 @@ public class StorageManagerTest extends TestCase {
@Override
public Unit invoke(String s) {
fail("Recursion-tolerating value should not be post computed");
return Unit.INSTANCE$;
return Unit.INSTANCE;
}
}
);
@@ -930,7 +930,7 @@ public class KotlinTestUtils {
@NotNull
public static ModuleDescriptorImpl createEmptyModule(@NotNull String name) {
return createEmptyModule(name, JvmPlatform.INSTANCE$);
return createEmptyModule(name, JvmPlatform.INSTANCE);
}
@NotNull
@@ -57,7 +57,7 @@ public class RecursiveDescriptorComparator {
options.setNameShortness(NameShortness.FULLY_QUALIFIED);
options.setVerbose(true);
options.setModifiers(DescriptorRendererModifier.ALL);
return Unit.INSTANCE$;
return Unit.INSTANCE;
}
}
);
@@ -110,7 +110,7 @@ public class DefaultModalityModifiersTest extends KotlinLiteFixture {
new FileBasedDeclarationProviderFactory(moduleContext.getStorageManager(),
Collections.singleton(aClass.getContainingKtFile())),
new BindingTraceContext(),
TargetPlatform.Default.INSTANCE$
TargetPlatform.Default.INSTANCE
);
return (ClassDescriptorWithResolutionScopes) resolveSession.getClassDescriptor(aClass, NoLookupLocation.FROM_TEST);
@@ -172,7 +172,7 @@ public class KotlinOverloadTest extends KotlinLiteFixture {
private FunctionDescriptor makeFunction(String funDecl) {
KtNamedFunction function = KtPsiFactoryKt.KtPsiFactory(getProject()).createFunction(funDecl);
LexicalScope scope = TypeTestUtilsKt.builtInPackageAsLexicalScope(JvmPlatform.INSTANCE$.getBuiltIns());
LexicalScope scope = TypeTestUtilsKt.builtInPackageAsLexicalScope(JvmPlatform.INSTANCE.getBuiltIns());
return functionDescriptorResolver.resolveFunctionDescriptor(root, scope, function, KotlinTestUtils.DUMMY_TRACE, DataFlowInfo.EMPTY);
}
}
@@ -76,7 +76,7 @@ public class KotlinTypeCheckerTest extends KotlinLiteFixture {
builtIns = module.getBuiltIns();
ContainerForTests container = InjectionKt.createContainerForTests(getProject(), module);
module.setDependencies(Collections.singletonList(module));
module.initialize(PackageFragmentProvider.Empty.INSTANCE$);
module.initialize(PackageFragmentProvider.Empty.INSTANCE);
typeResolver = container.getTypeResolver();
expressionTypingServices = container.getExpressionTypingServices();