Run "Add 'init' keyword in whole project" quickfix
This commit is contained in:
+1
-1
@@ -115,7 +115,7 @@ public abstract class CoveringTryCatchNodeProcessor<T: IntervalWithHandler>() {
|
||||
|
||||
public class DefaultProcessor(val node: MethodNode) : CoveringTryCatchNodeProcessor<TryCatchBlockNodeWrapper>() {
|
||||
|
||||
{
|
||||
init {
|
||||
node.tryCatchBlocks.forEach { addNode(it) }
|
||||
}
|
||||
|
||||
|
||||
@@ -194,8 +194,9 @@ public open class DefaultSourceMapper(val sourceInfo: SourceInfo, override val p
|
||||
|
||||
var fileMappings: LinkedHashMap<String, RawFileMapping> = linkedMapOf()
|
||||
|
||||
protected var origin: RawFileMapping by Delegates.notNull();
|
||||
{
|
||||
protected var origin: RawFileMapping by Delegates.notNull()
|
||||
|
||||
init {
|
||||
visitSource(sourceInfo.source, sourceInfo.pathOrCleanFQN)
|
||||
//map interval
|
||||
(1..maxUsedValue).forEach {origin.mapLine(it, it - 1, true) }
|
||||
|
||||
+1
-1
@@ -52,7 +52,7 @@ public class IncrementalPackageFragmentProvider(
|
||||
val fqNameToPackageFragment = HashMap<FqName, PackageFragmentDescriptor>()
|
||||
val fqNamesToLoad: Set<FqName>
|
||||
|
||||
;{
|
||||
init {
|
||||
fun createPackageFragment(fqName: FqName) {
|
||||
if (fqNameToPackageFragment.containsKey(fqName)) {
|
||||
return
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ public class VariableDeclarationInstruction(
|
||||
element: JetDeclaration,
|
||||
lexicalScope: LexicalScope
|
||||
) : InstructionWithNext(element, lexicalScope) {
|
||||
{
|
||||
init {
|
||||
assert(element is JetVariableDeclaration || element is JetParameter) { "Invalid element: ${render(element)}}" }
|
||||
}
|
||||
|
||||
|
||||
@@ -41,9 +41,9 @@ public abstract class JetCodeFragment(
|
||||
): JetFile((PsiManager.getInstance(_project) as PsiManagerEx).getFileManager().createFileViewProvider(LightVirtualFile(name, JetFileType.INSTANCE, text), true), false), JavaCodeFragment {
|
||||
|
||||
private var viewProvider = super<JetFile>.getViewProvider() as SingleRootFileViewProvider
|
||||
private var myImports = LinkedHashSet<String>();
|
||||
private var myImports = LinkedHashSet<String>()
|
||||
|
||||
{
|
||||
init {
|
||||
getViewProvider().forceCachedPsi(this)
|
||||
init(TokenType.CODE_FRAGMENT, elementType)
|
||||
if (context != null) {
|
||||
|
||||
@@ -490,7 +490,7 @@ public class JetPsiFactory(private val project: Project) {
|
||||
return createExpression(sb.toString()) as JetWhenExpression
|
||||
}
|
||||
|
||||
{
|
||||
init {
|
||||
if (subjectText != null) {
|
||||
sb.append("(").append(subjectText).append(") ")
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ public class KotlinFunctionStubImpl(
|
||||
private val hasTypeParameterListBeforeFunctionName: Boolean,
|
||||
private val isProbablyNothingType: Boolean
|
||||
) : KotlinStubBaseImpl<JetNamedFunction>(parent, JetStubElementTypes.FUNCTION), KotlinFunctionStub {
|
||||
{
|
||||
init {
|
||||
if (isTopLevel && fqName == null) {
|
||||
throw IllegalArgumentException("fqName shouldn't be null for top level functions")
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ public class KotlinPropertyStubImpl(
|
||||
private val fqName: FqName?
|
||||
) : KotlinStubBaseImpl<JetProperty>(parent, JetStubElementTypes.PROPERTY), KotlinPropertyStub {
|
||||
|
||||
{
|
||||
init {
|
||||
if (isTopLevel && fqName == null) {
|
||||
throw IllegalArgumentException("fqName shouldn't be null for top level properties")
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ import org.jetbrains.kotlin.lexer.JetModifierKeywordToken
|
||||
import kotlin.platform.platformStatic
|
||||
|
||||
public object ModifierMaskUtils {
|
||||
{
|
||||
init {
|
||||
assert(MODIFIER_KEYWORDS_ARRAY.size() <= 32, "Current implementation depends on the ability to represent modifier list as bit mask")
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ public class MutablePackageFragmentProvider(public val module: ModuleDescriptor)
|
||||
private val fqNameToPackage = HashMap<FqName, MutablePackageFragmentDescriptor>()
|
||||
private val subPackages = MultiMap.create<FqName, FqName>()
|
||||
|
||||
;{
|
||||
init {
|
||||
fqNameToPackage.put(FqName.ROOT, MutablePackageFragmentDescriptor(module, FqName.ROOT))
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ public class FakeCallableDescriptorForObject(
|
||||
public val classDescriptor: ClassDescriptor
|
||||
) : DeclarationDescriptorWithVisibility by classDescriptor.getClassObjectReferenceTarget(), VariableDescriptor {
|
||||
|
||||
{
|
||||
init {
|
||||
assert(classDescriptor.getClassObjectType() != null) {
|
||||
"FakeCallableDescriptorForObject can be created only for objects, classes with companion object or enum entries: $classDescriptor"
|
||||
}
|
||||
|
||||
+1
-1
@@ -90,7 +90,7 @@ public class LazyAnnotationDescriptor(
|
||||
val annotationEntry: JetAnnotationEntry
|
||||
) : AnnotationDescriptor, LazyEntity {
|
||||
|
||||
{
|
||||
init {
|
||||
c.trace.record(BindingContext.ANNOTATION, annotationEntry, this)
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@ public class LazyScriptDescriptor(
|
||||
ScriptDescriptor.NAME,
|
||||
jetScript.toSourceElement()
|
||||
) {
|
||||
{
|
||||
init {
|
||||
resolveSession.getTrace().record(BindingContext.SCRIPT, jetScript, this)
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -72,7 +72,7 @@ public class KotlinLightClassForPackage private(
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
init {
|
||||
assert(!files.isEmpty()) { "No files for package " + packageFqName }
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -178,7 +178,7 @@ public abstract class AbstractJvmRuntimeDescriptorLoaderTest : TestCaseWithTmpdi
|
||||
private class SyntheticPackageViewForTest(private val module: ModuleDescriptor) : PackageViewDescriptor {
|
||||
private val scope = WritableScopeImpl(JetScope.Empty, this, RedeclarationHandler.THROW_EXCEPTION, "runtime descriptor loader test")
|
||||
|
||||
;{
|
||||
init {
|
||||
scope.changeLockLevel(WritableScope.LockLevel.BOTH)
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ private val INCOMPLETE_PATTERN = Pattern.compile("\\.\\.\\.( *)(.*)$")
|
||||
private val INCOMPLETE_LINE_MESSAGE = "incomplete line"
|
||||
|
||||
public abstract class AbstractReplInterpreterTest : UsefulTestCase() {
|
||||
{
|
||||
init {
|
||||
System.setProperty("java.awt.headless", "true")
|
||||
}
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@ class MutableDiagnosticsTest : KotlinTestWithEnvironment() {
|
||||
private inner class DummyDiagnostic : Diagnostic {
|
||||
val dummyElement = JetPsiFactory(getEnvironment().project).createType("Int")
|
||||
|
||||
;{
|
||||
init {
|
||||
dummyElement.getContainingJetFile().doNotAnalyze = null
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ public class ConstraintSystemTestData(
|
||||
private val functionFoo: FunctionDescriptor
|
||||
private val scopeToResolveTypeParameters: JetScope
|
||||
|
||||
{
|
||||
init {
|
||||
val functions = context.getSliceContents(BindingContext.FUNCTION)
|
||||
functionFoo = findFunctionByName(functions.values(), "foo")
|
||||
val function = DescriptorToSourceUtils.descriptorToDeclaration(functionFoo) as JetFunction
|
||||
|
||||
@@ -37,9 +37,9 @@ public object LibraryUtils {
|
||||
private val METAINF = "META-INF/"
|
||||
private val MANIFEST_PATH = "${METAINF}MANIFEST.MF"
|
||||
private val METAINF_RESOURCES = "${METAINF}resources/"
|
||||
private val KOTLIN_JS_MODULE_ATTRIBUTE_NAME = Attributes.Name(KOTLIN_JS_MODULE_NAME);
|
||||
private val KOTLIN_JS_MODULE_ATTRIBUTE_NAME = Attributes.Name(KOTLIN_JS_MODULE_NAME)
|
||||
|
||||
{
|
||||
init {
|
||||
var jsStdLib = ""
|
||||
var jsLib = ""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user