Run "Add 'init' keyword in whole project" quickfix
This commit is contained in:
+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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user