rename PSI classes according to current terminology:
KtMultiDeclaration(Entry) -> KtDestructuringDeclaration(Entry) KtFunctionLiteralExpression -> KtLambdaExpression KtFunctionLiteralArgument -> KtLambdaArgument KtDelegationSpecifierList -> KtSuperTypeList KtDelegationSpecifier -> KtSuperTypeListEntry KtDelegatorToSuperClass -> KtSuperTypeEntry KtDelegatorToSuperCall -> KtSuperTypeCallEntry KtDelegationByExpressionSpecifier ->KtDelegatedSuperTypeEntry
This commit is contained in:
@@ -140,7 +140,7 @@ public class CodegenUtil {
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static ClassDescriptor getSuperClassByDelegationSpecifier(@NotNull KtDelegationSpecifier specifier, @NotNull BindingContext bindingContext) {
|
||||
public static ClassDescriptor getSuperClassBySuperTypeListEntry(@NotNull KtSuperTypeListEntry specifier, @NotNull BindingContext bindingContext) {
|
||||
KotlinType superType = bindingContext.get(BindingContext.TYPE, specifier.getTypeReference());
|
||||
assert superType != null : "superType should not be null: " + specifier.getText();
|
||||
|
||||
|
||||
@@ -668,7 +668,7 @@ public class ExpressionCodegen extends KtVisitor<StackValue, StackValue> impleme
|
||||
});
|
||||
}
|
||||
else {
|
||||
KtMultiDeclaration multiParameter = forExpression.getMultiParameter();
|
||||
KtDestructuringDeclaration multiParameter = forExpression.getDestructuringParameter();
|
||||
assert multiParameter != null;
|
||||
|
||||
// E tmp<e> = tmp<iterator>.next()
|
||||
@@ -686,15 +686,15 @@ public class ExpressionCodegen extends KtVisitor<StackValue, StackValue> impleme
|
||||
assignToLoopParameter();
|
||||
|
||||
if (forExpression.getLoopParameter() == null) {
|
||||
KtMultiDeclaration multiParameter = forExpression.getMultiParameter();
|
||||
KtDestructuringDeclaration multiParameter = forExpression.getDestructuringParameter();
|
||||
assert multiParameter != null;
|
||||
|
||||
generateMultiVariables(multiParameter.getEntries());
|
||||
}
|
||||
}
|
||||
|
||||
private void generateMultiVariables(List<KtMultiDeclarationEntry> entries) {
|
||||
for (KtMultiDeclarationEntry variableDeclaration : entries) {
|
||||
private void generateMultiVariables(List<KtDestructuringDeclarationEntry> entries) {
|
||||
for (KtDestructuringDeclarationEntry variableDeclaration : entries) {
|
||||
final VariableDescriptor componentDescriptor = bindingContext.get(VARIABLE, variableDeclaration);
|
||||
|
||||
@SuppressWarnings("ConstantConditions") final Type componentAsmType = asmType(componentDescriptor.getReturnType());
|
||||
@@ -1331,7 +1331,7 @@ public class ExpressionCodegen extends KtVisitor<StackValue, StackValue> impleme
|
||||
}
|
||||
|
||||
@Override
|
||||
public StackValue visitFunctionLiteralExpression(@NotNull KtFunctionLiteralExpression expression, StackValue receiver) {
|
||||
public StackValue visitLambdaExpression(@NotNull KtLambdaExpression expression, StackValue receiver) {
|
||||
if (Boolean.TRUE.equals(bindingContext.get(BLOCK, expression))) {
|
||||
return gen(expression.getFunctionLiteral().getBodyExpression());
|
||||
}
|
||||
@@ -1568,9 +1568,9 @@ public class ExpressionCodegen extends KtVisitor<StackValue, StackValue> impleme
|
||||
|
||||
|
||||
private void putDescriptorIntoFrameMap(@NotNull KtElement statement) {
|
||||
if (statement instanceof KtMultiDeclaration) {
|
||||
KtMultiDeclaration multiDeclaration = (KtMultiDeclaration) statement;
|
||||
for (KtMultiDeclarationEntry entry : multiDeclaration.getEntries()) {
|
||||
if (statement instanceof KtDestructuringDeclaration) {
|
||||
KtDestructuringDeclaration multiDeclaration = (KtDestructuringDeclaration) statement;
|
||||
for (KtDestructuringDeclarationEntry entry : multiDeclaration.getEntries()) {
|
||||
putLocalVariableIntoFrameMap(entry);
|
||||
}
|
||||
}
|
||||
@@ -1608,9 +1608,9 @@ public class ExpressionCodegen extends KtVisitor<StackValue, StackValue> impleme
|
||||
@NotNull Label blockEnd,
|
||||
@NotNull List<Function<StackValue, Void>> leaveTasks
|
||||
) {
|
||||
if (statement instanceof KtMultiDeclaration) {
|
||||
KtMultiDeclaration multiDeclaration = (KtMultiDeclaration) statement;
|
||||
for (KtMultiDeclarationEntry entry : multiDeclaration.getEntries()) {
|
||||
if (statement instanceof KtDestructuringDeclaration) {
|
||||
KtDestructuringDeclaration multiDeclaration = (KtDestructuringDeclaration) statement;
|
||||
for (KtDestructuringDeclarationEntry entry : multiDeclaration.getEntries()) {
|
||||
addLeaveTaskToRemoveLocalVariableFromFrameMap(entry, blockEnd, leaveTasks);
|
||||
}
|
||||
}
|
||||
@@ -2250,8 +2250,8 @@ public class ExpressionCodegen extends KtVisitor<StackValue, StackValue> impleme
|
||||
final SamType samType = bindingContext.get(SAM_VALUE, probablyParenthesizedExpression);
|
||||
if (samType == null || expression == null) return null;
|
||||
|
||||
if (expression instanceof KtFunctionLiteralExpression) {
|
||||
return genClosure(((KtFunctionLiteralExpression) expression).getFunctionLiteral(), samType);
|
||||
if (expression instanceof KtLambdaExpression) {
|
||||
return genClosure(((KtLambdaExpression) expression).getFunctionLiteral(), samType);
|
||||
}
|
||||
|
||||
if (expression instanceof KtNamedFunction) {
|
||||
@@ -3274,7 +3274,7 @@ public class ExpressionCodegen extends KtVisitor<StackValue, StackValue> impleme
|
||||
}
|
||||
|
||||
@Override
|
||||
public StackValue visitMultiDeclaration(@NotNull KtMultiDeclaration multiDeclaration, StackValue receiver) {
|
||||
public StackValue visitDestructuringDeclaration(@NotNull KtDestructuringDeclaration multiDeclaration, StackValue receiver) {
|
||||
KtExpression initializer = multiDeclaration.getInitializer();
|
||||
if (initializer == null) return StackValue.none();
|
||||
|
||||
@@ -3291,7 +3291,7 @@ public class ExpressionCodegen extends KtVisitor<StackValue, StackValue> impleme
|
||||
v.store(tempVarIndex, initializerAsmType);
|
||||
StackValue.Local local = StackValue.local(tempVarIndex, initializerAsmType);
|
||||
|
||||
for (KtMultiDeclarationEntry variableDeclaration : multiDeclaration.getEntries()) {
|
||||
for (KtDestructuringDeclarationEntry variableDeclaration : multiDeclaration.getEntries()) {
|
||||
ResolvedCall<FunctionDescriptor> resolvedCall = bindingContext.get(COMPONENT_RESOLVED_CALL, variableDeclaration);
|
||||
assert resolvedCall != null : "Resolved call is null for " + variableDeclaration.getText();
|
||||
Call call = makeFakeCall(initializerAsReceiver);
|
||||
|
||||
@@ -371,7 +371,7 @@ public class ImplementationBodyCodegen extends ClassBodyCodegen {
|
||||
|
||||
generateCompanionObjectBackingFieldCopies();
|
||||
|
||||
DelegationFieldsInfo delegationFieldsInfo = getDelegationFieldsInfo(myClass.getDelegationSpecifiers());
|
||||
DelegationFieldsInfo delegationFieldsInfo = getDelegationFieldsInfo(myClass.getSuperTypeListEntries());
|
||||
try {
|
||||
lookupConstructorExpressionsInClosureIfPresent();
|
||||
generatePrimaryConstructor(delegationFieldsInfo);
|
||||
@@ -1012,9 +1012,9 @@ public class ImplementationBodyCodegen extends ClassBodyCodegen {
|
||||
}
|
||||
}
|
||||
|
||||
for (KtDelegationSpecifier specifier : myClass.getDelegationSpecifiers()) {
|
||||
if (specifier instanceof KtDelegatorByExpressionSpecifier) {
|
||||
genCallToDelegatorByExpressionSpecifier(iv, codegen, (KtDelegatorByExpressionSpecifier) specifier, fieldsInfo);
|
||||
for (KtSuperTypeListEntry specifier : myClass.getSuperTypeListEntries()) {
|
||||
if (specifier instanceof KtDelegatedSuperTypeEntry) {
|
||||
genCallToDelegatorByExpressionSpecifier(iv, codegen, (KtDelegatedSuperTypeEntry) specifier, fieldsInfo);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1153,41 +1153,41 @@ public class ImplementationBodyCodegen extends ClassBodyCodegen {
|
||||
return StackValue.field(type, classAsmType, name, false, StackValue.none());
|
||||
}
|
||||
}
|
||||
private final Map<KtDelegatorByExpressionSpecifier, Field> fields = new HashMap<KtDelegatorByExpressionSpecifier, Field>();
|
||||
private final Map<KtDelegatedSuperTypeEntry, Field> fields = new HashMap<KtDelegatedSuperTypeEntry, Field>();
|
||||
|
||||
@NotNull
|
||||
public Field getInfo(KtDelegatorByExpressionSpecifier specifier) {
|
||||
public Field getInfo(KtDelegatedSuperTypeEntry specifier) {
|
||||
return fields.get(specifier);
|
||||
}
|
||||
|
||||
private void addField(KtDelegatorByExpressionSpecifier specifier, PropertyDescriptor propertyDescriptor) {
|
||||
private void addField(KtDelegatedSuperTypeEntry specifier, PropertyDescriptor propertyDescriptor) {
|
||||
fields.put(specifier,
|
||||
new Field(typeMapper.mapType(propertyDescriptor), propertyDescriptor.getName().asString(), false));
|
||||
}
|
||||
|
||||
private void addField(KtDelegatorByExpressionSpecifier specifier, Type type, String name) {
|
||||
private void addField(KtDelegatedSuperTypeEntry specifier, Type type, String name) {
|
||||
fields.put(specifier, new Field(type, name, true));
|
||||
}
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private DelegationFieldsInfo getDelegationFieldsInfo(@NotNull List<KtDelegationSpecifier> delegationSpecifiers) {
|
||||
private DelegationFieldsInfo getDelegationFieldsInfo(@NotNull List<KtSuperTypeListEntry> delegationSpecifiers) {
|
||||
DelegationFieldsInfo result = new DelegationFieldsInfo();
|
||||
int n = 0;
|
||||
for (KtDelegationSpecifier specifier : delegationSpecifiers) {
|
||||
if (specifier instanceof KtDelegatorByExpressionSpecifier) {
|
||||
KtExpression expression = ((KtDelegatorByExpressionSpecifier) specifier).getDelegateExpression();
|
||||
for (KtSuperTypeListEntry specifier : delegationSpecifiers) {
|
||||
if (specifier instanceof KtDelegatedSuperTypeEntry) {
|
||||
KtExpression expression = ((KtDelegatedSuperTypeEntry) specifier).getDelegateExpression();
|
||||
PropertyDescriptor propertyDescriptor = CodegenUtil.getDelegatePropertyIfAny(expression, descriptor, bindingContext);
|
||||
|
||||
|
||||
if (CodegenUtil.isFinalPropertyWithBackingField(propertyDescriptor, bindingContext)) {
|
||||
result.addField((KtDelegatorByExpressionSpecifier) specifier, propertyDescriptor);
|
||||
result.addField((KtDelegatedSuperTypeEntry) specifier, propertyDescriptor);
|
||||
}
|
||||
else {
|
||||
KotlinType expressionType = expression != null ? bindingContext.getType(expression) : null;
|
||||
Type asmType =
|
||||
expressionType != null ? typeMapper.mapType(expressionType) : typeMapper.mapType(getSuperClass(specifier));
|
||||
result.addField((KtDelegatorByExpressionSpecifier) specifier, asmType, "$delegate_" + n);
|
||||
result.addField((KtDelegatedSuperTypeEntry) specifier, asmType, "$delegate_" + n);
|
||||
}
|
||||
n++;
|
||||
}
|
||||
@@ -1196,14 +1196,14 @@ public class ImplementationBodyCodegen extends ClassBodyCodegen {
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private ClassDescriptor getSuperClass(@NotNull KtDelegationSpecifier specifier) {
|
||||
return CodegenUtil.getSuperClassByDelegationSpecifier(specifier, bindingContext);
|
||||
private ClassDescriptor getSuperClass(@NotNull KtSuperTypeListEntry specifier) {
|
||||
return CodegenUtil.getSuperClassBySuperTypeListEntry(specifier, bindingContext);
|
||||
}
|
||||
|
||||
private void genCallToDelegatorByExpressionSpecifier(
|
||||
InstructionAdapter iv,
|
||||
ExpressionCodegen codegen,
|
||||
KtDelegatorByExpressionSpecifier specifier,
|
||||
KtDelegatedSuperTypeEntry specifier,
|
||||
DelegationFieldsInfo fieldsInfo
|
||||
) {
|
||||
KtExpression expression = specifier.getDelegateExpression();
|
||||
@@ -1303,9 +1303,9 @@ public class ImplementationBodyCodegen extends ClassBodyCodegen {
|
||||
}
|
||||
}
|
||||
|
||||
for (KtDelegationSpecifier specifier : myClass.getDelegationSpecifiers()) {
|
||||
if (specifier instanceof KtDelegatorByExpressionSpecifier) {
|
||||
KtExpression delegateExpression = ((KtDelegatorByExpressionSpecifier) specifier).getDelegateExpression();
|
||||
for (KtSuperTypeListEntry specifier : myClass.getSuperTypeListEntries()) {
|
||||
if (specifier instanceof KtDelegatedSuperTypeEntry) {
|
||||
KtExpression delegateExpression = ((KtDelegatedSuperTypeEntry) specifier).getDelegateExpression();
|
||||
assert delegateExpression != null;
|
||||
delegateExpression.accept(visitor);
|
||||
}
|
||||
@@ -1620,7 +1620,7 @@ public class ImplementationBodyCodegen extends ClassBodyCodegen {
|
||||
iv.aconst(enumEntry.getName());
|
||||
iv.iconst(ordinal);
|
||||
|
||||
List<KtDelegationSpecifier> delegationSpecifiers = enumEntry.getDelegationSpecifiers();
|
||||
List<KtSuperTypeListEntry> delegationSpecifiers = enumEntry.getSuperTypeListEntries();
|
||||
if (delegationSpecifiers.size() == 1 && !enumEntryNeedSubclass(bindingContext, enumEntry)) {
|
||||
ResolvedCall<?> resolvedCall = CallUtilKt.getResolvedCallWithAssert(delegationSpecifiers.get(0), bindingContext);
|
||||
|
||||
@@ -1638,11 +1638,11 @@ public class ImplementationBodyCodegen extends ClassBodyCodegen {
|
||||
}
|
||||
|
||||
private void generateDelegates(DelegationFieldsInfo delegationFieldsInfo) {
|
||||
for (KtDelegationSpecifier specifier : myClass.getDelegationSpecifiers()) {
|
||||
if (specifier instanceof KtDelegatorByExpressionSpecifier) {
|
||||
DelegationFieldsInfo.Field field = delegationFieldsInfo.getInfo((KtDelegatorByExpressionSpecifier) specifier);
|
||||
for (KtSuperTypeListEntry specifier : myClass.getSuperTypeListEntries()) {
|
||||
if (specifier instanceof KtDelegatedSuperTypeEntry) {
|
||||
DelegationFieldsInfo.Field field = delegationFieldsInfo.getInfo((KtDelegatedSuperTypeEntry) specifier);
|
||||
generateDelegateField(field);
|
||||
KtExpression delegateExpression = ((KtDelegatorByExpressionSpecifier) specifier).getDelegateExpression();
|
||||
KtExpression delegateExpression = ((KtDelegatedSuperTypeEntry) specifier).getDelegateExpression();
|
||||
KotlinType delegateExpressionType = delegateExpression != null ? bindingContext.getType(delegateExpression) : null;
|
||||
generateDelegates(getSuperClass(specifier), delegateExpressionType, field);
|
||||
}
|
||||
|
||||
+8
-8
@@ -129,7 +129,7 @@ class CodegenAnnotatingVisitor extends KtVisitorVoid {
|
||||
|
||||
if (element instanceof KtObjectDeclaration &&
|
||||
element.getParent() instanceof KtObjectLiteralExpression &&
|
||||
child instanceof KtDelegationSpecifierList) {
|
||||
child instanceof KtSuperTypeList) {
|
||||
// If we're passing an anonymous object's super call, it means "container" is ConstructorDescriptor of that object.
|
||||
// To reach outer context, we should call getContainingDeclaration() twice
|
||||
// TODO: this is probably not entirely correct, mostly because DECLARATION_TO_DESCRIPTOR can return null
|
||||
@@ -178,7 +178,7 @@ class CodegenAnnotatingVisitor extends KtVisitorVoid {
|
||||
@Override
|
||||
public void visitEnumEntry(@NotNull KtEnumEntry enumEntry) {
|
||||
if (enumEntry.getDeclarations().isEmpty()) {
|
||||
for (KtDelegationSpecifier specifier : enumEntry.getDelegationSpecifiers()) {
|
||||
for (KtSuperTypeListEntry specifier : enumEntry.getSuperTypeListEntries()) {
|
||||
specifier.accept(this);
|
||||
}
|
||||
return;
|
||||
@@ -248,7 +248,7 @@ class CodegenAnnotatingVisitor extends KtVisitorVoid {
|
||||
String name = inventAnonymousClassName();
|
||||
recordClosure(classDescriptor, name);
|
||||
|
||||
KtDelegationSpecifierList delegationSpecifierList = object.getDelegationSpecifierList();
|
||||
KtSuperTypeList delegationSpecifierList = object.getSuperTypeList();
|
||||
if (delegationSpecifierList != null) {
|
||||
delegationSpecifierList.accept(this);
|
||||
}
|
||||
@@ -264,8 +264,8 @@ class CodegenAnnotatingVisitor extends KtVisitorVoid {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visitFunctionLiteralExpression(@NotNull KtFunctionLiteralExpression expression) {
|
||||
KtFunctionLiteral functionLiteral = expression.getFunctionLiteral();
|
||||
public void visitLambdaExpression(@NotNull KtLambdaExpression lambdaExpression) {
|
||||
KtFunctionLiteral functionLiteral = lambdaExpression.getFunctionLiteral();
|
||||
FunctionDescriptor functionDescriptor =
|
||||
(FunctionDescriptor) bindingContext.get(DECLARATION_TO_DESCRIPTOR, functionLiteral);
|
||||
// working around a problem with shallow analysis
|
||||
@@ -278,7 +278,7 @@ class CodegenAnnotatingVisitor extends KtVisitorVoid {
|
||||
|
||||
classStack.push(classDescriptor);
|
||||
nameStack.push(name);
|
||||
super.visitFunctionLiteralExpression(expression);
|
||||
super.visitLambdaExpression(lambdaExpression);
|
||||
nameStack.pop();
|
||||
classStack.pop();
|
||||
}
|
||||
@@ -432,8 +432,8 @@ class CodegenAnnotatingVisitor extends KtVisitorVoid {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visitDelegationToSuperCallSpecifier(@NotNull KtDelegatorToSuperCall call) {
|
||||
super.visitDelegationToSuperCallSpecifier(call);
|
||||
public void visitSuperTypeCallEntry(@NotNull KtSuperTypeCallEntry call) {
|
||||
super.visitSuperTypeCallEntry(call);
|
||||
checkSamCall(call);
|
||||
}
|
||||
|
||||
|
||||
@@ -546,7 +546,7 @@ public class InlineCodegen extends CallGenerator {
|
||||
}
|
||||
|
||||
protected static boolean isInlinableParameterExpression(KtExpression deparenthesized) {
|
||||
return deparenthesized instanceof KtFunctionLiteralExpression ||
|
||||
return deparenthesized instanceof KtLambdaExpression ||
|
||||
deparenthesized instanceof KtNamedFunction ||
|
||||
deparenthesized instanceof KtCallableReferenceExpression;
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ import org.jetbrains.kotlin.codegen.state.JetTypeMapper;
|
||||
import org.jetbrains.kotlin.descriptors.ClassDescriptor;
|
||||
import org.jetbrains.kotlin.descriptors.FunctionDescriptor;
|
||||
import org.jetbrains.kotlin.psi.KtExpression;
|
||||
import org.jetbrains.kotlin.psi.KtFunctionLiteralExpression;
|
||||
import org.jetbrains.kotlin.psi.KtLambdaExpression;
|
||||
import org.jetbrains.kotlin.resolve.BindingContext;
|
||||
import org.jetbrains.kotlin.resolve.jvm.AsmTypes;
|
||||
import org.jetbrains.kotlin.resolve.jvm.jvmSignature.JvmMethodSignature;
|
||||
@@ -61,8 +61,8 @@ public class LambdaInfo implements CapturedParamOwner, LabelOwner {
|
||||
private final Type closureClassType;
|
||||
|
||||
LambdaInfo(@NotNull KtExpression expr, @NotNull JetTypeMapper typeMapper) {
|
||||
this.expression = expr instanceof KtFunctionLiteralExpression ?
|
||||
((KtFunctionLiteralExpression) expr).getFunctionLiteral() : expr;
|
||||
this.expression = expr instanceof KtLambdaExpression ?
|
||||
((KtLambdaExpression) expr).getFunctionLiteral() : expr;
|
||||
|
||||
this.typeMapper = typeMapper;
|
||||
BindingContext bindingContext = typeMapper.getBindingContext();
|
||||
|
||||
@@ -49,7 +49,7 @@ import org.jetbrains.kotlin.platform.JavaToKotlinClassMap;
|
||||
import org.jetbrains.kotlin.psi.KtExpression;
|
||||
import org.jetbrains.kotlin.psi.KtFile;
|
||||
import org.jetbrains.kotlin.psi.KtFunctionLiteral;
|
||||
import org.jetbrains.kotlin.psi.KtFunctionLiteralExpression;
|
||||
import org.jetbrains.kotlin.psi.KtLambdaExpression;
|
||||
import org.jetbrains.kotlin.resolve.*;
|
||||
import org.jetbrains.kotlin.resolve.annotations.AnnotationUtilKt;
|
||||
import org.jetbrains.kotlin.resolve.calls.model.DefaultValueArgument;
|
||||
@@ -898,7 +898,7 @@ public class JetTypeMapper {
|
||||
PsiElement element = DescriptorToSourceUtils.getSourceFromDescriptor(descriptor);
|
||||
if (element instanceof KtFunctionLiteral) {
|
||||
PsiElement expression = element.getParent();
|
||||
if (expression instanceof KtFunctionLiteralExpression) {
|
||||
if (expression instanceof KtLambdaExpression) {
|
||||
SamType samType = bindingContext.get(SAM_VALUE, (KtExpression) expression);
|
||||
if (samType != null) {
|
||||
return samType.getAbstractMethod().getName().asString();
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ object JvmSimpleNameBacktickChecker : IdentifierChecker {
|
||||
}
|
||||
|
||||
override fun checkDeclaration(declaration: KtDeclaration, diagnosticHolder: DiagnosticSink) {
|
||||
if (declaration is KtMultiDeclaration) {
|
||||
if (declaration is KtDestructuringDeclaration) {
|
||||
declaration.entries.forEach { checkNamed(it, diagnosticHolder) }
|
||||
}
|
||||
if (declaration is KtCallableDeclaration) {
|
||||
|
||||
@@ -28,8 +28,8 @@ public interface KtNodeTypes {
|
||||
IElementType CLASS = KtStubElementTypes.CLASS;
|
||||
IElementType FUN = KtStubElementTypes.FUNCTION;
|
||||
IElementType PROPERTY = KtStubElementTypes.PROPERTY;
|
||||
IElementType MULTI_VARIABLE_DECLARATION = new KtNodeType("MULTI_VARIABLE_DECLARATION", KtMultiDeclaration.class);
|
||||
IElementType MULTI_VARIABLE_DECLARATION_ENTRY = new KtNodeType("MULTI_VARIABLE_DECLARATION_ENTRY", KtMultiDeclarationEntry.class);
|
||||
IElementType DESTRUCTURING_DECLARATION = new KtNodeType("DESTRUCTURING_DECLARATION", KtDestructuringDeclaration.class);
|
||||
IElementType DESTRUCTURING_DECLARATION_ENTRY = new KtNodeType("DESTRUCTURING_DECLARATION_ENTRY", KtDestructuringDeclarationEntry.class);
|
||||
|
||||
KtNodeType TYPEDEF = new KtNodeType("TYPEDEF", KtTypedef.class);
|
||||
IElementType OBJECT_DECLARATION = KtStubElementTypes.OBJECT_DECLARATION;
|
||||
@@ -42,10 +42,10 @@ public interface KtNodeTypes {
|
||||
|
||||
IElementType TYPE_PARAMETER_LIST = KtStubElementTypes.TYPE_PARAMETER_LIST;
|
||||
IElementType TYPE_PARAMETER = KtStubElementTypes.TYPE_PARAMETER;
|
||||
IElementType DELEGATION_SPECIFIER_LIST = KtStubElementTypes.DELEGATION_SPECIFIER_LIST;
|
||||
IElementType DELEGATOR_BY = KtStubElementTypes.DELEGATOR_BY;
|
||||
IElementType DELEGATOR_SUPER_CALL = KtStubElementTypes.DELEGATOR_SUPER_CALL;
|
||||
IElementType DELEGATOR_SUPER_CLASS = KtStubElementTypes.DELEGATOR_SUPER_CLASS;
|
||||
IElementType SUPER_TYPE_LIST = KtStubElementTypes.SUPER_TYPE_LIST;
|
||||
IElementType DELEGATED_SUPER_TYPE_ENTRY = KtStubElementTypes.DELEGATED_SUPER_TYPE_ENTRY;
|
||||
IElementType SUPER_TYPE_CALL_ENTRY = KtStubElementTypes.SUPER_TYPE_CALL_ENTRY;
|
||||
IElementType SUPER_TYPE_ENTRY = KtStubElementTypes.SUPER_TYPE_ENTRY;
|
||||
KtNodeType PROPERTY_DELEGATE = new KtNodeType("PROPERTY_DELEGATE", KtPropertyDelegate.class);
|
||||
IElementType CONSTRUCTOR_CALLEE = KtStubElementTypes.CONSTRUCTOR_CALLEE;
|
||||
IElementType VALUE_PARAMETER_LIST = KtStubElementTypes.VALUE_PARAMETER_LIST;
|
||||
@@ -63,7 +63,7 @@ public interface KtNodeTypes {
|
||||
IElementType TYPE_ARGUMENT_LIST = KtStubElementTypes.TYPE_ARGUMENT_LIST;
|
||||
KtNodeType VALUE_ARGUMENT_LIST = new KtNodeType("VALUE_ARGUMENT_LIST", KtValueArgumentList.class);
|
||||
KtNodeType VALUE_ARGUMENT = new KtNodeType("VALUE_ARGUMENT", KtValueArgument.class);
|
||||
KtNodeType FUNCTION_LITERAL_ARGUMENT = new KtNodeType("FUNCTION_LITERAL_ARGUMENT", KtFunctionLiteralArgument.class);
|
||||
KtNodeType LAMBDA_ARGUMENT = new KtNodeType("LAMBDA_ARGUMENT", KtLambdaArgument.class);
|
||||
KtNodeType VALUE_ARGUMENT_NAME = new KtNodeType("VALUE_ARGUMENT_NAME", KtValueArgumentName.class);
|
||||
IElementType TYPE_REFERENCE = KtStubElementTypes.TYPE_REFERENCE;
|
||||
|
||||
@@ -116,7 +116,7 @@ public interface KtNodeTypes {
|
||||
KtNodeType LOOP_RANGE = new KtNodeType("LOOP_RANGE", KtContainerNode.class);
|
||||
KtNodeType BODY = new KtNodeType("BODY", KtContainerNode.class);
|
||||
KtNodeType BLOCK = new KtNodeType("BLOCK", KtBlockExpression.class);
|
||||
KtNodeType FUNCTION_LITERAL_EXPRESSION = new KtNodeType("FUNCTION_LITERAL_EXPRESSION", KtFunctionLiteralExpression.class);
|
||||
KtNodeType LAMBDA_EXPRESSION = new KtNodeType("LAMBDA_EXPRESSION", KtLambdaExpression.class);
|
||||
KtNodeType FUNCTION_LITERAL = new KtNodeType("FUNCTION_LITERAL", KtFunctionLiteral.class);
|
||||
KtNodeType ANNOTATED_EXPRESSION = new KtNodeType("ANNOTATED_EXPRESSION", KtAnnotatedExpression.class);
|
||||
|
||||
|
||||
@@ -880,18 +880,18 @@ public class KotlinControlFlowProcessor {
|
||||
|
||||
private void declareLoopParameter(KtForExpression expression) {
|
||||
KtParameter loopParameter = expression.getLoopParameter();
|
||||
KtMultiDeclaration multiDeclaration = expression.getMultiParameter();
|
||||
KtDestructuringDeclaration multiDeclaration = expression.getDestructuringParameter();
|
||||
if (loopParameter != null) {
|
||||
builder.declareParameter(loopParameter);
|
||||
}
|
||||
else if (multiDeclaration != null) {
|
||||
visitMultiDeclaration(multiDeclaration, false);
|
||||
visitDestructuringDeclaration(multiDeclaration, false);
|
||||
}
|
||||
}
|
||||
|
||||
private void writeLoopParameterAssignment(KtForExpression expression) {
|
||||
KtParameter loopParameter = expression.getLoopParameter();
|
||||
KtMultiDeclaration multiDeclaration = expression.getMultiParameter();
|
||||
KtDestructuringDeclaration multiDeclaration = expression.getDestructuringParameter();
|
||||
KtExpression loopRange = expression.getLoopRange();
|
||||
|
||||
PseudoValue value = builder.magic(
|
||||
@@ -905,7 +905,7 @@ public class KotlinControlFlowProcessor {
|
||||
generateInitializer(loopParameter, value);
|
||||
}
|
||||
else if (multiDeclaration != null) {
|
||||
for (KtMultiDeclarationEntry entry : multiDeclaration.getEntries()) {
|
||||
for (KtDestructuringDeclarationEntry entry : multiDeclaration.getEntries()) {
|
||||
generateInitializer(entry, value);
|
||||
}
|
||||
}
|
||||
@@ -1079,11 +1079,11 @@ public class KotlinControlFlowProcessor {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visitFunctionLiteralExpression(@NotNull KtFunctionLiteralExpression expression) {
|
||||
mark(expression);
|
||||
KtFunctionLiteral functionLiteral = expression.getFunctionLiteral();
|
||||
public void visitLambdaExpression(@NotNull KtLambdaExpression lambdaExpression) {
|
||||
mark(lambdaExpression);
|
||||
KtFunctionLiteral functionLiteral = lambdaExpression.getFunctionLiteral();
|
||||
visitFunction(functionLiteral);
|
||||
copyValue(functionLiteral, expression);
|
||||
copyValue(functionLiteral, lambdaExpression);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1161,14 +1161,14 @@ public class KotlinControlFlowProcessor {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visitMultiDeclaration(@NotNull KtMultiDeclaration declaration) {
|
||||
visitMultiDeclaration(declaration, true);
|
||||
public void visitDestructuringDeclaration(@NotNull KtDestructuringDeclaration declaration) {
|
||||
visitDestructuringDeclaration(declaration, true);
|
||||
}
|
||||
|
||||
private void visitMultiDeclaration(@NotNull KtMultiDeclaration declaration, boolean generateWriteForEntries) {
|
||||
private void visitDestructuringDeclaration(@NotNull KtDestructuringDeclaration declaration, boolean generateWriteForEntries) {
|
||||
KtExpression initializer = declaration.getInitializer();
|
||||
generateInstructions(initializer);
|
||||
for (KtMultiDeclarationEntry entry : declaration.getEntries()) {
|
||||
for (KtDestructuringDeclarationEntry entry : declaration.getEntries()) {
|
||||
builder.declareVariable(entry);
|
||||
|
||||
ResolvedCall<FunctionDescriptor> resolvedCall = trace.get(BindingContext.COMPONENT_RESOLVED_CALL, entry);
|
||||
@@ -1348,7 +1348,7 @@ public class KotlinControlFlowProcessor {
|
||||
}
|
||||
|
||||
private void generateHeaderDelegationSpecifiers(@NotNull KtClassOrObject classOrObject) {
|
||||
for (KtDelegationSpecifier specifier : classOrObject.getDelegationSpecifiers()) {
|
||||
for (KtSuperTypeListEntry specifier : classOrObject.getSuperTypeListEntries()) {
|
||||
generateInstructions(specifier);
|
||||
}
|
||||
}
|
||||
@@ -1414,7 +1414,7 @@ public class KotlinControlFlowProcessor {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visitDelegationToSuperCallSpecifier(@NotNull KtDelegatorToSuperCall call) {
|
||||
public void visitSuperTypeCallEntry(@NotNull KtSuperTypeCallEntry call) {
|
||||
generateCallOrMarkUnresolved(call);
|
||||
}
|
||||
|
||||
@@ -1439,19 +1439,19 @@ public class KotlinControlFlowProcessor {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visitDelegationByExpressionSpecifier(@NotNull KtDelegatorByExpressionSpecifier specifier) {
|
||||
public void visitDelegatedSuperTypeEntry(@NotNull KtDelegatedSuperTypeEntry specifier) {
|
||||
KtExpression delegateExpression = specifier.getDelegateExpression();
|
||||
generateInstructions(delegateExpression);
|
||||
createSyntheticValue(specifier, MagicKind.VALUE_CONSUMER, delegateExpression);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visitDelegationToSuperClassSpecifier(@NotNull KtDelegatorToSuperClass specifier) {
|
||||
public void visitSuperTypeEntry(@NotNull KtSuperTypeEntry specifier) {
|
||||
// Do not generate UNSUPPORTED_ELEMENT here
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visitDelegationSpecifierList(@NotNull KtDelegationSpecifierList list) {
|
||||
public void visitSuperTypeList(@NotNull KtSuperTypeList list) {
|
||||
list.acceptChildren(this);
|
||||
}
|
||||
|
||||
|
||||
@@ -633,7 +633,7 @@ public class KotlinFlowInformationProvider {
|
||||
report(Errors.VARIABLE_WITH_REDUNDANT_INITIALIZER.on(initializer, variableDescriptor), ctxt);
|
||||
}
|
||||
}
|
||||
else if (element instanceof KtMultiDeclarationEntry) {
|
||||
else if (element instanceof KtDestructuringDeclarationEntry) {
|
||||
report(VARIABLE_WITH_REDUNDANT_INITIALIZER.on(element, variableDescriptor), ctxt);
|
||||
}
|
||||
}
|
||||
@@ -661,8 +661,8 @@ public class KotlinFlowInformationProvider {
|
||||
&& PseudocodeUtilsKt.getSideEffectFree(instruction)) {
|
||||
VariableContext ctxt = new VariableContext(instruction, reportedDiagnosticMap);
|
||||
report(
|
||||
element instanceof KtFunctionLiteralExpression
|
||||
? Errors.UNUSED_LAMBDA_EXPRESSION.on((KtFunctionLiteralExpression) element)
|
||||
element instanceof KtLambdaExpression
|
||||
? Errors.UNUSED_LAMBDA_EXPRESSION.on((KtLambdaExpression) element)
|
||||
: Errors.UNUSED_EXPRESSION.on(element),
|
||||
ctxt
|
||||
);
|
||||
|
||||
+1
-1
@@ -426,7 +426,7 @@ public class KotlinControlFlowInstructionsGenerator extends KotlinControlFlowBui
|
||||
@NotNull
|
||||
@Override
|
||||
public InstructionWithValue createLambda(@NotNull KtFunction expression) {
|
||||
return read(expression instanceof KtFunctionLiteral ? (KtFunctionLiteralExpression) expression.getParent() : expression);
|
||||
return read(expression instanceof KtFunctionLiteral ? (KtLambdaExpression) expression.getParent() : expression);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
@@ -219,7 +219,7 @@ public fun getExpectedTypePredicate(
|
||||
}
|
||||
}
|
||||
|
||||
element is KtDelegatorByExpressionSpecifier ->
|
||||
element is KtDelegatedSuperTypeEntry ->
|
||||
addSubtypesOf(bindingContext[TYPE, element.getTypeReference()])
|
||||
}
|
||||
}
|
||||
@@ -260,7 +260,7 @@ fun Instruction.calcSideEffectFree(): Boolean {
|
||||
}
|
||||
|
||||
else -> when (element) {
|
||||
is KtConstantExpression, is KtFunctionLiteralExpression, is KtStringTemplateExpression -> true
|
||||
is KtConstantExpression, is KtLambdaExpression, is KtStringTemplateExpression -> true
|
||||
else -> false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,11 +106,11 @@ public class DebugInfoUtil {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visitMultiDeclaration(@NotNull KtMultiDeclaration multiDeclaration) {
|
||||
for (KtMultiDeclarationEntry entry : multiDeclaration.getEntries()) {
|
||||
public void visitDestructuringDeclaration(@NotNull KtDestructuringDeclaration destructuringDeclaration) {
|
||||
for (KtDestructuringDeclarationEntry entry : destructuringDeclaration.getEntries()) {
|
||||
reportIfDynamicCall(entry, entry, COMPONENT_RESOLVED_CALL);
|
||||
}
|
||||
super.visitMultiDeclaration(multiDeclaration);
|
||||
super.visitDestructuringDeclaration(destructuringDeclaration);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -78,8 +78,8 @@ public interface Errors {
|
||||
DiagnosticFactory2<KtParameter, EffectiveVisibility, EffectiveVisibility> EXPOSED_PARAMETER_TYPE = DiagnosticFactory2.create(ERROR);
|
||||
DiagnosticFactory2<KtTypeReference, EffectiveVisibility, EffectiveVisibility> EXPOSED_RECEIVER_TYPE = DiagnosticFactory2.create(ERROR);
|
||||
DiagnosticFactory2<KtTypeParameter, EffectiveVisibility, EffectiveVisibility> EXPOSED_TYPE_PARAMETER_BOUND = DiagnosticFactory2.create(ERROR);
|
||||
DiagnosticFactory2<KtDelegationSpecifier, EffectiveVisibility, EffectiveVisibility> EXPOSED_SUPER_CLASS = DiagnosticFactory2.create(ERROR);
|
||||
DiagnosticFactory2<KtDelegationSpecifier, EffectiveVisibility, EffectiveVisibility> EXPOSED_SUPER_INTERFACE = DiagnosticFactory2.create(ERROR);
|
||||
DiagnosticFactory2<KtSuperTypeListEntry, EffectiveVisibility, EffectiveVisibility> EXPOSED_SUPER_CLASS = DiagnosticFactory2.create(ERROR);
|
||||
DiagnosticFactory2<KtSuperTypeListEntry, EffectiveVisibility, EffectiveVisibility> EXPOSED_SUPER_INTERFACE = DiagnosticFactory2.create(ERROR);
|
||||
|
||||
DiagnosticFactory1<KtElement, Collection<ClassDescriptor>> PLATFORM_CLASS_MAPPED_TO_KOTLIN = DiagnosticFactory1.create(WARNING);
|
||||
|
||||
@@ -142,7 +142,7 @@ public interface Errors {
|
||||
|
||||
// Annotations
|
||||
|
||||
DiagnosticFactory0<KtDelegationSpecifierList> SUPERTYPES_FOR_ANNOTATION_CLASS = DiagnosticFactory0.create(ERROR);
|
||||
DiagnosticFactory0<KtSuperTypeList> SUPERTYPES_FOR_ANNOTATION_CLASS = DiagnosticFactory0.create(ERROR);
|
||||
DiagnosticFactory0<KtParameter> MISSING_VAL_ON_ANNOTATION_PARAMETER = DiagnosticFactory0.create(ERROR);
|
||||
DiagnosticFactory0<KtCallExpression> ANNOTATION_CLASS_CONSTRUCTOR_CALL = DiagnosticFactory0.create(ERROR);
|
||||
DiagnosticFactory1<KtAnnotationEntry, DeclarationDescriptor> NOT_AN_ANNOTATION_CLASS = DiagnosticFactory1.create(ERROR);
|
||||
@@ -178,7 +178,7 @@ public interface Errors {
|
||||
|
||||
DiagnosticFactory0<PsiElement> CYCLIC_INHERITANCE_HIERARCHY = DiagnosticFactory0.create(ERROR);
|
||||
|
||||
DiagnosticFactory0<KtDelegatorToSuperClass> SUPERTYPE_NOT_INITIALIZED = DiagnosticFactory0.create(ERROR);
|
||||
DiagnosticFactory0<KtSuperTypeEntry> SUPERTYPE_NOT_INITIALIZED = DiagnosticFactory0.create(ERROR);
|
||||
|
||||
DiagnosticFactory0<KtTypeReference> DELEGATION_NOT_TO_INTERFACE = DiagnosticFactory0.create(ERROR);
|
||||
DiagnosticFactory0<KtTypeReference> SUPERTYPE_NOT_A_CLASS_OR_INTERFACE = DiagnosticFactory0.create(ERROR);
|
||||
@@ -188,7 +188,7 @@ public interface Errors {
|
||||
|
||||
DiagnosticFactory0<KtTypeReference> MANY_CLASSES_IN_SUPERTYPE_LIST = DiagnosticFactory0.create(ERROR);
|
||||
DiagnosticFactory0<KtTypeReference> SUPERTYPE_APPEARS_TWICE = DiagnosticFactory0.create(ERROR);
|
||||
DiagnosticFactory3<KtDelegationSpecifierList, TypeParameterDescriptor, ClassDescriptor, Collection<KotlinType>>
|
||||
DiagnosticFactory3<KtSuperTypeList, TypeParameterDescriptor, ClassDescriptor, Collection<KotlinType>>
|
||||
INCONSISTENT_TYPE_PARAMETER_VALUES = DiagnosticFactory3.create(ERROR);
|
||||
DiagnosticFactory3<KtTypeParameter, TypeParameterDescriptor, ClassDescriptor, Collection<KotlinType>>
|
||||
INCONSISTENT_TYPE_PARAMETER_BOUNDS = DiagnosticFactory3.create(ERROR);
|
||||
@@ -207,7 +207,7 @@ public interface Errors {
|
||||
DiagnosticFactory0<KtConstructorDelegationReferenceExpression> CYCLIC_CONSTRUCTOR_DELEGATION_CALL = DiagnosticFactory0.create(ERROR);
|
||||
|
||||
DiagnosticFactory0<KtDeclaration> CONSTRUCTOR_IN_OBJECT = DiagnosticFactory0.create(ERROR, DECLARATION_SIGNATURE);
|
||||
DiagnosticFactory0<KtDelegatorToSuperCall> SUPERTYPE_INITIALIZED_WITHOUT_PRIMARY_CONSTRUCTOR = DiagnosticFactory0.create(ERROR);
|
||||
DiagnosticFactory0<KtSuperTypeCallEntry> SUPERTYPE_INITIALIZED_WITHOUT_PRIMARY_CONSTRUCTOR = DiagnosticFactory0.create(ERROR);
|
||||
|
||||
DiagnosticFactory0<KtConstructorDelegationCall> PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED =
|
||||
DiagnosticFactory0.create(ERROR, PositioningStrategies.SECONDARY_CONSTRUCTOR_DELEGATION_CALL);
|
||||
@@ -231,7 +231,7 @@ public interface Errors {
|
||||
|
||||
DiagnosticFactory0<PsiElement> SUPERTYPE_INITIALIZED_IN_INTERFACE = DiagnosticFactory0.create(ERROR);
|
||||
|
||||
DiagnosticFactory0<KtDelegatorByExpressionSpecifier> DELEGATION_IN_INTERFACE = DiagnosticFactory0.create(ERROR);
|
||||
DiagnosticFactory0<KtDelegatedSuperTypeEntry> DELEGATION_IN_INTERFACE = DiagnosticFactory0.create(ERROR);
|
||||
|
||||
DiagnosticFactory0<PsiElement> INTERFACE_WITH_SUPERCLASS = DiagnosticFactory0.create(ERROR);
|
||||
|
||||
@@ -532,7 +532,7 @@ public interface Errors {
|
||||
|
||||
// Destructuring-declarations
|
||||
|
||||
DiagnosticFactory0<KtMultiDeclaration> INITIALIZER_REQUIRED_FOR_DESTRUCTURING_DECLARATION = DiagnosticFactory0.create(ERROR, DEFAULT);
|
||||
DiagnosticFactory0<KtDestructuringDeclaration> INITIALIZER_REQUIRED_FOR_DESTRUCTURING_DECLARATION = DiagnosticFactory0.create(ERROR, DEFAULT);
|
||||
DiagnosticFactory2<KtExpression, Name, KotlinType> COMPONENT_FUNCTION_MISSING = DiagnosticFactory2.create(ERROR, DEFAULT);
|
||||
DiagnosticFactory2<KtExpression, Name, Collection<? extends ResolvedCall<?>>> COMPONENT_FUNCTION_AMBIGUITY = DiagnosticFactory2.create(ERROR, DEFAULT);
|
||||
DiagnosticFactory3<KtExpression, Name, KotlinType, KotlinType> COMPONENT_FUNCTION_RETURN_TYPE_MISMATCH = DiagnosticFactory3.create(ERROR, DEFAULT);
|
||||
@@ -626,7 +626,7 @@ public interface Errors {
|
||||
DiagnosticFactory2<KtBinaryExpression, KtElement, DeclarationDescriptor> UNUSED_VALUE = DiagnosticFactory2.create(WARNING, PositioningStrategies.UNUSED_VALUE);
|
||||
DiagnosticFactory1<KtElement, KtElement> UNUSED_CHANGED_VALUE = DiagnosticFactory1.create(WARNING);
|
||||
DiagnosticFactory0<KtElement> UNUSED_EXPRESSION = DiagnosticFactory0.create(WARNING);
|
||||
DiagnosticFactory0<KtFunctionLiteralExpression> UNUSED_LAMBDA_EXPRESSION = DiagnosticFactory0.create(WARNING);
|
||||
DiagnosticFactory0<KtLambdaExpression> UNUSED_LAMBDA_EXPRESSION = DiagnosticFactory0.create(WARNING);
|
||||
|
||||
DiagnosticFactory1<KtExpression, DeclarationDescriptor> VAL_REASSIGNMENT = DiagnosticFactory1.create(ERROR);
|
||||
DiagnosticFactory1<KtExpression, DeclarationDescriptor> SETTER_PROJECTED_OUT = DiagnosticFactory1.create(ERROR);
|
||||
|
||||
@@ -49,7 +49,7 @@ public object PositioningStrategies {
|
||||
is KtObjectLiteralExpression -> {
|
||||
val objectDeclaration = element.getObjectDeclaration()
|
||||
val objectKeyword = objectDeclaration.getObjectKeyword()
|
||||
val delegationSpecifierList = objectDeclaration.getDelegationSpecifierList()
|
||||
val delegationSpecifierList = objectDeclaration.getSuperTypeList()
|
||||
if (delegationSpecifierList == null) {
|
||||
return markElement(objectKeyword)
|
||||
}
|
||||
@@ -426,7 +426,7 @@ public object PositioningStrategies {
|
||||
|
||||
@JvmField public val DELEGATOR_SUPER_CALL: PositioningStrategy<KtEnumEntry> = object: PositioningStrategy<KtEnumEntry>() {
|
||||
override fun mark(element: KtEnumEntry): List<TextRange> {
|
||||
val specifiers = element.getDelegationSpecifiers()
|
||||
val specifiers = element.getSuperTypeListEntries()
|
||||
return markElement(if (specifiers.isEmpty()) element else specifiers[0])
|
||||
}
|
||||
}
|
||||
|
||||
@@ -545,7 +545,7 @@ public class KotlinExpressionParsing extends AbstractKotlinParsing {
|
||||
break;
|
||||
}
|
||||
|
||||
argument.done(FUNCTION_LITERAL_ARGUMENT);
|
||||
argument.done(LAMBDA_ARGUMENT);
|
||||
success = true;
|
||||
}
|
||||
|
||||
@@ -1031,7 +1031,7 @@ public class KotlinExpressionParsing extends AbstractKotlinParsing {
|
||||
if (declType != null) {
|
||||
// we do not attach preceding comments (non-doc) to local variables because they are likely commenting a few statements below
|
||||
closeDeclarationWithCommentBinders(decl, declType,
|
||||
declType != KtNodeTypes.PROPERTY && declType != KtNodeTypes.MULTI_VARIABLE_DECLARATION);
|
||||
declType != KtNodeTypes.PROPERTY && declType != KtNodeTypes.DESTRUCTURING_DECLARATION);
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
@@ -1104,7 +1104,7 @@ public class KotlinExpressionParsing extends AbstractKotlinParsing {
|
||||
myBuilder.restoreNewlinesState();
|
||||
|
||||
literal.done(FUNCTION_LITERAL);
|
||||
literalExpression.done(FUNCTION_LITERAL_EXPRESSION);
|
||||
literalExpression.done(LAMBDA_EXPRESSION);
|
||||
}
|
||||
|
||||
private boolean rollbackOrDropAt(PsiBuilder.Marker rollbackMarker, IElementType dropAt) {
|
||||
@@ -1352,7 +1352,7 @@ public class KotlinExpressionParsing extends AbstractKotlinParsing {
|
||||
|
||||
if (at(LPAR)) {
|
||||
myJetParsing.parseMultiDeclarationName(TokenSet.create(IN_KEYWORD, LBRACE));
|
||||
parameter.done(MULTI_VARIABLE_DECLARATION);
|
||||
parameter.done(DESTRUCTURING_DECLARATION);
|
||||
}
|
||||
else {
|
||||
expect(IDENTIFIER, "Expecting a variable name", TokenSet.create(COLON, IN_KEYWORD));
|
||||
|
||||
@@ -960,7 +960,7 @@ public class KotlinParsing extends AbstractKotlinParsing {
|
||||
callee.done(CONSTRUCTOR_CALLEE);
|
||||
|
||||
myExpressionParsing.parseValueArgumentList();
|
||||
delegatorSuperCall.done(DELEGATOR_SUPER_CALL);
|
||||
delegatorSuperCall.done(SUPER_TYPE_CALL_ENTRY);
|
||||
initializerList.done(INITIALIZER_LIST);
|
||||
}
|
||||
if (at(LBRACE)) {
|
||||
@@ -1284,7 +1284,7 @@ public class KotlinParsing extends AbstractKotlinParsing {
|
||||
}
|
||||
}
|
||||
|
||||
return multiDeclaration ? MULTI_VARIABLE_DECLARATION : PROPERTY;
|
||||
return multiDeclaration ? DESTRUCTURING_DECLARATION : PROPERTY;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1329,7 +1329,7 @@ public class KotlinParsing extends AbstractKotlinParsing {
|
||||
advance(); // COLON
|
||||
parseTypeRef(follow);
|
||||
}
|
||||
property.done(MULTI_VARIABLE_DECLARATION_ENTRY);
|
||||
property.done(DESTRUCTURING_DECLARATION_ENTRY);
|
||||
|
||||
if (!at(COMMA)) break;
|
||||
advance(); // COMMA
|
||||
@@ -1637,7 +1637,7 @@ public class KotlinParsing extends AbstractKotlinParsing {
|
||||
advance(); // COMMA
|
||||
}
|
||||
|
||||
list.done(DELEGATION_SPECIFIER_LIST);
|
||||
list.done(SUPER_TYPE_LIST);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1660,16 +1660,16 @@ public class KotlinParsing extends AbstractKotlinParsing {
|
||||
reference.drop();
|
||||
advance(); // BY_KEYWORD
|
||||
createForByClause(myBuilder).myExpressionParsing.parseExpression();
|
||||
delegator.done(DELEGATOR_BY);
|
||||
delegator.done(DELEGATED_SUPER_TYPE_ENTRY);
|
||||
}
|
||||
else if (at(LPAR)) {
|
||||
reference.done(CONSTRUCTOR_CALLEE);
|
||||
myExpressionParsing.parseValueArgumentList();
|
||||
delegator.done(DELEGATOR_SUPER_CALL);
|
||||
delegator.done(SUPER_TYPE_CALL_ENTRY);
|
||||
}
|
||||
else {
|
||||
reference.drop();
|
||||
delegator.done(DELEGATOR_SUPER_CLASS);
|
||||
delegator.done(SUPER_TYPE_ENTRY);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ public interface Call {
|
||||
|
||||
@ReadOnly
|
||||
@NotNull
|
||||
List<? extends FunctionLiteralArgument> getFunctionLiteralArguments();
|
||||
List<? extends LambdaArgument> getFunctionLiteralArguments();
|
||||
|
||||
@ReadOnly
|
||||
@NotNull
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
|
||||
package org.jetbrains.kotlin.psi.debugText
|
||||
|
||||
import org.jetbrains.kotlin.psi.*
|
||||
import org.jetbrains.kotlin.lexer.KtTokens
|
||||
import com.intellij.openapi.diagnostic.Logger
|
||||
import org.jetbrains.kotlin.lexer.KtTokens
|
||||
import org.jetbrains.kotlin.psi.*
|
||||
|
||||
// invoke this instead of getText() when you need debug text to identify some place in PSI without storing the element itself
|
||||
// this is need to avoid unnecessary file parses
|
||||
@@ -98,11 +98,11 @@ private object DebugTextBuildingVisitor : KtVisitor<String, Unit>() {
|
||||
return render(constructorCalleeExpression, constructorCalleeExpression.getConstructorReferenceExpression())
|
||||
}
|
||||
|
||||
override fun visitDelegationSpecifier(specifier: KtDelegationSpecifier, data: Unit?): String? {
|
||||
override fun visitSuperTypeListEntry(specifier: KtSuperTypeListEntry, data: Unit?): String? {
|
||||
return render(specifier, specifier.getTypeReference())
|
||||
}
|
||||
|
||||
override fun visitDelegationSpecifierList(list: KtDelegationSpecifierList, data: Unit?): String? {
|
||||
override fun visitSuperTypeList(list: KtSuperTypeList, data: Unit?): String? {
|
||||
return renderChildren(list, ", ")
|
||||
}
|
||||
|
||||
@@ -208,7 +208,7 @@ private object DebugTextBuildingVisitor : KtVisitor<String, Unit>() {
|
||||
appendInn(klass.getTypeParameterList())
|
||||
appendInn(klass.getPrimaryConstructorModifierList(), prefix = " ", suffix = " ")
|
||||
appendInn(klass.getPrimaryConstructorParameterList())
|
||||
appendInn(klass.getDelegationSpecifierList(), prefix = " : ")
|
||||
appendInn(klass.getSuperTypeList(), prefix = " : ")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -239,7 +239,7 @@ private object DebugTextBuildingVisitor : KtVisitor<String, Unit>() {
|
||||
appendInn(declaration.getModifierList(), suffix = " ")
|
||||
append("object ")
|
||||
appendInn(declaration.getNameAsName())
|
||||
appendInn(declaration.getDelegationSpecifierList(), prefix = " : ")
|
||||
appendInn(declaration.getSuperTypeList(), prefix = " : ")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ public class KtAnnotationEntry extends KtElementImplStub<KotlinAnnotationEntrySt
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public List<KtFunctionLiteralArgument> getFunctionLiteralArguments() {
|
||||
public List<KtLambdaArgument> getLambdaArguments() {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ public interface KtCallElement extends KtElement {
|
||||
List<? extends ValueArgument> getValueArguments();
|
||||
|
||||
@NotNull
|
||||
List<KtFunctionLiteralArgument> getFunctionLiteralArguments();
|
||||
List<KtLambdaArgument> getLambdaArguments();
|
||||
|
||||
@NotNull
|
||||
List<KtTypeProjection> getTypeArguments();
|
||||
|
||||
@@ -60,8 +60,8 @@ public class KtCallExpression extends KtExpressionImpl implements KtCallElement,
|
||||
*/
|
||||
@Override
|
||||
@NotNull
|
||||
public List<KtFunctionLiteralArgument> getFunctionLiteralArguments() {
|
||||
return findChildrenByType(KtNodeTypes.FUNCTION_LITERAL_ARGUMENT);
|
||||
public List<KtLambdaArgument> getLambdaArguments() {
|
||||
return findChildrenByType(KtNodeTypes.LAMBDA_ARGUMENT);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -69,7 +69,7 @@ public class KtCallExpression extends KtExpressionImpl implements KtCallElement,
|
||||
public List<KtValueArgument> getValueArguments() {
|
||||
KtValueArgumentList list = getValueArgumentList();
|
||||
List<KtValueArgument> valueArgumentsInParentheses = list != null ? list.getArguments() : Collections.<KtValueArgument>emptyList();
|
||||
List<KtFunctionLiteralArgument> functionLiteralArguments = getFunctionLiteralArguments();
|
||||
List<KtLambdaArgument> functionLiteralArguments = getLambdaArguments();
|
||||
if (functionLiteralArguments.isEmpty()) {
|
||||
return valueArgumentsInParentheses;
|
||||
}
|
||||
|
||||
@@ -25,7 +25,6 @@ import com.intellij.psi.impl.CheckUtil
|
||||
import com.intellij.psi.impl.source.codeStyle.CodeEditUtil
|
||||
import com.intellij.psi.stubs.IStubElementType
|
||||
import com.intellij.psi.util.PsiTreeUtil
|
||||
import org.jetbrains.kotlin.KtNodeTypes
|
||||
import org.jetbrains.kotlin.lexer.KtTokens
|
||||
import org.jetbrains.kotlin.psi.stubs.KotlinClassOrObjectStub
|
||||
import org.jetbrains.kotlin.psi.stubs.elements.KtStubElementTypes
|
||||
@@ -35,26 +34,26 @@ abstract public class KtClassOrObject :
|
||||
public constructor(node: ASTNode) : super(node)
|
||||
public constructor(stub: KotlinClassOrObjectStub<out KtClassOrObject>, nodeType: IStubElementType<*, *>) : super(stub, nodeType)
|
||||
|
||||
public fun getDelegationSpecifierList(): KtDelegationSpecifierList? = getStubOrPsiChild(KtStubElementTypes.DELEGATION_SPECIFIER_LIST)
|
||||
open public fun getDelegationSpecifiers(): List<KtDelegationSpecifier> = getDelegationSpecifierList()?.getDelegationSpecifiers().orEmpty()
|
||||
public fun getSuperTypeList(): KtSuperTypeList? = getStubOrPsiChild(KtStubElementTypes.SUPER_TYPE_LIST)
|
||||
open public fun getSuperTypeListEntries(): List<KtSuperTypeListEntry> = getSuperTypeList()?.getEntries().orEmpty()
|
||||
|
||||
public fun addDelegationSpecifier(delegationSpecifier: KtDelegationSpecifier): KtDelegationSpecifier {
|
||||
getDelegationSpecifierList()?.let {
|
||||
return EditCommaSeparatedListHelper.addItem(it, getDelegationSpecifiers(), delegationSpecifier)
|
||||
public fun addSuperTypeListEntry(superTypeListEntry: KtSuperTypeListEntry): KtSuperTypeListEntry {
|
||||
getSuperTypeList()?.let {
|
||||
return EditCommaSeparatedListHelper.addItem(it, getSuperTypeListEntries(), superTypeListEntry)
|
||||
}
|
||||
|
||||
val psiFactory = KtPsiFactory(this)
|
||||
val specifierListToAdd = psiFactory.createDelegatorToSuperCall("A()").replace(delegationSpecifier).getParent()
|
||||
val specifierListToAdd = psiFactory.createSuperTypeCallEntry("A()").replace(superTypeListEntry).getParent()
|
||||
val colon = addBefore(psiFactory.createColon(), getBody())
|
||||
return (addAfter(specifierListToAdd, colon) as KtDelegationSpecifierList).getDelegationSpecifiers().first()
|
||||
return (addAfter(specifierListToAdd, colon) as KtSuperTypeList).getEntries().first()
|
||||
}
|
||||
|
||||
public fun removeDelegationSpecifier(delegationSpecifier: KtDelegationSpecifier) {
|
||||
val specifierList = getDelegationSpecifierList() ?: return
|
||||
assert(delegationSpecifier.getParent() === specifierList)
|
||||
public fun removeSuperTypeListEntry(superTypeListEntry: KtSuperTypeListEntry) {
|
||||
val specifierList = getSuperTypeList() ?: return
|
||||
assert(superTypeListEntry.getParent() === specifierList)
|
||||
|
||||
if (specifierList.getDelegationSpecifiers().size() > 1) {
|
||||
EditCommaSeparatedListHelper.removeItem<KtElement>(delegationSpecifier)
|
||||
if (specifierList.getEntries().size() > 1) {
|
||||
EditCommaSeparatedListHelper.removeItem<KtElement>(superTypeListEntry)
|
||||
}
|
||||
else {
|
||||
deleteChildRange(findChildByType<PsiElement>(KtTokens.COLON) ?: specifierList, specifierList)
|
||||
|
||||
@@ -44,7 +44,7 @@ public class KtConstructorDelegationCall extends KtElementImpl implements KtCall
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public List<KtFunctionLiteralArgument> getFunctionLiteralArguments() {
|
||||
public List<KtLambdaArgument> getLambdaArguments() {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
|
||||
+5
-5
@@ -22,18 +22,18 @@ import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.kotlin.psi.stubs.KotlinPlaceHolderStub;
|
||||
import org.jetbrains.kotlin.psi.stubs.elements.KtStubElementTypes;
|
||||
|
||||
public class KtDelegatorByExpressionSpecifier extends KtDelegationSpecifier {
|
||||
public KtDelegatorByExpressionSpecifier(@NotNull ASTNode node) {
|
||||
public class KtDelegatedSuperTypeEntry extends KtSuperTypeListEntry {
|
||||
public KtDelegatedSuperTypeEntry(@NotNull ASTNode node) {
|
||||
super(node);
|
||||
}
|
||||
|
||||
public KtDelegatorByExpressionSpecifier(@NotNull KotlinPlaceHolderStub<? extends KtDelegationSpecifier> stub) {
|
||||
super(stub, KtStubElementTypes.DELEGATOR_BY);
|
||||
public KtDelegatedSuperTypeEntry(@NotNull KotlinPlaceHolderStub<? extends KtSuperTypeListEntry> stub) {
|
||||
super(stub, KtStubElementTypes.DELEGATED_SUPER_TYPE_ENTRY);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <R, D> R accept(@NotNull KtVisitor<R, D> visitor, D data) {
|
||||
return visitor.visitDelegationByExpressionSpecifier(this, data);
|
||||
return visitor.visitDelegatedSuperTypeEntry(this, data);
|
||||
}
|
||||
|
||||
@Nullable @IfNotParsed
|
||||
+5
-5
@@ -29,19 +29,19 @@ import java.util.List;
|
||||
|
||||
import static org.jetbrains.kotlin.lexer.KtTokens.*;
|
||||
|
||||
public class KtMultiDeclaration extends KtDeclarationImpl implements KtValVarKeywordOwner {
|
||||
public KtMultiDeclaration(@NotNull ASTNode node) {
|
||||
public class KtDestructuringDeclaration extends KtDeclarationImpl implements KtValVarKeywordOwner {
|
||||
public KtDestructuringDeclaration(@NotNull ASTNode node) {
|
||||
super(node);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <R, D> R accept(@NotNull KtVisitor<R, D> visitor, D data) {
|
||||
return visitor.visitMultiDeclaration(this, data);
|
||||
return visitor.visitDestructuringDeclaration(this, data);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public List<KtMultiDeclarationEntry> getEntries() {
|
||||
return findChildrenByType(KtNodeTypes.MULTI_VARIABLE_DECLARATION_ENTRY);
|
||||
public List<KtDestructuringDeclarationEntry> getEntries() {
|
||||
return findChildrenByType(KtNodeTypes.DESTRUCTURING_DECLARATION_ENTRY);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
+4
-4
@@ -34,8 +34,8 @@ import java.util.List;
|
||||
import static org.jetbrains.kotlin.lexer.KtTokens.VAL_KEYWORD;
|
||||
import static org.jetbrains.kotlin.lexer.KtTokens.VAR_KEYWORD;
|
||||
|
||||
public class KtMultiDeclarationEntry extends KtNamedDeclarationNotStubbed implements KtVariableDeclaration {
|
||||
public KtMultiDeclarationEntry(@NotNull ASTNode node) {
|
||||
public class KtDestructuringDeclarationEntry extends KtNamedDeclarationNotStubbed implements KtVariableDeclaration {
|
||||
public KtDestructuringDeclarationEntry(@NotNull ASTNode node) {
|
||||
super(node);
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ public class KtMultiDeclarationEntry extends KtNamedDeclarationNotStubbed implem
|
||||
|
||||
@Override
|
||||
public <R, D> R accept(@NotNull KtVisitor<R, D> visitor, D data) {
|
||||
return visitor.visitMultiDeclarationEntry(this, data);
|
||||
return visitor.visitDestructuringDeclarationEntry(this, data);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -122,7 +122,7 @@ public class KtMultiDeclarationEntry extends KtNamedDeclarationNotStubbed implem
|
||||
@NotNull
|
||||
private ASTNode getParentNode() {
|
||||
ASTNode parent = getNode().getTreeParent();
|
||||
assert parent.getElementType() == KtNodeTypes.MULTI_VARIABLE_DECLARATION;
|
||||
assert parent.getElementType() == KtNodeTypes.DESTRUCTURING_DECLARATION;
|
||||
return parent;
|
||||
}
|
||||
|
||||
@@ -20,11 +20,8 @@ import com.intellij.lang.ASTNode;
|
||||
import com.intellij.psi.PsiClass;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.PsiEnumConstant;
|
||||
import com.intellij.util.IncorrectOperationException;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.kotlin.psi.stubs.KotlinClassOrObjectStub;
|
||||
import org.jetbrains.kotlin.psi.stubs.KotlinClassStub;
|
||||
import org.jetbrains.kotlin.psi.stubs.elements.KtStubElementTypes;
|
||||
|
||||
@@ -42,7 +39,7 @@ public class KtEnumEntry extends KtClass {
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public List<KtDelegationSpecifier> getDelegationSpecifiers() {
|
||||
public List<KtSuperTypeListEntry> getSuperTypeListEntries() {
|
||||
KtInitializerList initializerList = getInitializerList();
|
||||
if (initializerList == null) {
|
||||
return Collections.emptyList();
|
||||
@@ -51,7 +48,7 @@ public class KtEnumEntry extends KtClass {
|
||||
}
|
||||
|
||||
public boolean hasInitializer() {
|
||||
return !getDelegationSpecifiers().isEmpty();
|
||||
return !getSuperTypeListEntries().isEmpty();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
||||
@@ -38,8 +38,8 @@ public class KtForExpression extends KtLoopExpression {
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public KtMultiDeclaration getMultiParameter() {
|
||||
return (KtMultiDeclaration) findChildByType(KtNodeTypes.MULTI_VARIABLE_DECLARATION);
|
||||
public KtDestructuringDeclaration getDestructuringParameter() {
|
||||
return (KtDestructuringDeclaration) findChildByType(KtNodeTypes.DESTRUCTURING_DECLARATION);
|
||||
}
|
||||
|
||||
@Nullable @IfNotParsed
|
||||
|
||||
@@ -39,7 +39,7 @@ public class KtInitializerList extends KtElementImplStub<KotlinPlaceHolderStub<K
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public List<KtDelegationSpecifier> getInitializers() {
|
||||
return Arrays.asList(getStubOrPsiChildren(KtStubElementTypes.DELEGATION_SPECIFIER_TYPES, KtDelegationSpecifier.ARRAY_FACTORY));
|
||||
public List<KtSuperTypeListEntry> getInitializers() {
|
||||
return Arrays.asList(getStubOrPsiChildren(KtStubElementTypes.SUPER_TYPE_LIST_ENTRIES, KtSuperTypeListEntry.ARRAY_FACTORY));
|
||||
}
|
||||
}
|
||||
|
||||
+5
-5
@@ -18,16 +18,16 @@ package org.jetbrains.kotlin.psi
|
||||
|
||||
import com.intellij.lang.ASTNode
|
||||
|
||||
public class KtFunctionLiteralArgument(node: ASTNode) : KtValueArgument(node), FunctionLiteralArgument {
|
||||
public class KtLambdaArgument(node: ASTNode) : KtValueArgument(node), LambdaArgument {
|
||||
|
||||
override fun getArgumentExpression() = super<KtValueArgument>.getArgumentExpression()!!
|
||||
override fun getArgumentExpression() = super.getArgumentExpression()!!
|
||||
|
||||
override fun getFunctionLiteral(): KtFunctionLiteralExpression = getArgumentExpression().unpackFunctionLiteral()!!
|
||||
override fun getLambdaExpression(): KtLambdaExpression = getArgumentExpression().unpackFunctionLiteral()!!
|
||||
}
|
||||
|
||||
public fun KtExpression.unpackFunctionLiteral(allowParentheses: Boolean = false): KtFunctionLiteralExpression? {
|
||||
public fun KtExpression.unpackFunctionLiteral(allowParentheses: Boolean = false): KtLambdaExpression? {
|
||||
return when (this) {
|
||||
is KtFunctionLiteralExpression -> this
|
||||
is KtLambdaExpression -> this
|
||||
is KtLabeledExpression -> baseExpression?.unpackFunctionLiteral(allowParentheses)
|
||||
is KtAnnotatedExpression -> baseExpression?.unpackFunctionLiteral(allowParentheses)
|
||||
is KtParenthesizedExpression -> if (allowParentheses) expression?.unpackFunctionLiteral(allowParentheses) else null
|
||||
+3
-3
@@ -24,14 +24,14 @@ import org.jetbrains.kotlin.lexer.KtTokens;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class KtFunctionLiteralExpression extends KtExpressionImpl {
|
||||
public KtFunctionLiteralExpression(@NotNull ASTNode node) {
|
||||
public class KtLambdaExpression extends KtExpressionImpl {
|
||||
public KtLambdaExpression(@NotNull ASTNode node) {
|
||||
super(node);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <R, D> R accept(@NotNull KtVisitor<R, D> visitor, D data) {
|
||||
return visitor.visitFunctionLiteralExpression(this, data);
|
||||
return visitor.visitLambdaExpression(this, data);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@@ -204,8 +204,8 @@ public class KtPsiFactory(private val project: Project) {
|
||||
return getter
|
||||
}
|
||||
|
||||
public fun createMultiDeclaration(text: String): KtMultiDeclaration {
|
||||
return (createFunction("fun foo() {$text}").bodyExpression as KtBlockExpression).statements.first() as KtMultiDeclaration
|
||||
public fun createDestructuringDeclaration(text: String): KtDestructuringDeclaration {
|
||||
return (createFunction("fun foo() {$text}").bodyExpression as KtBlockExpression).statements.first() as KtDestructuringDeclaration
|
||||
}
|
||||
|
||||
public fun <TDeclaration : KtDeclaration> createDeclaration(text: String): TDeclaration {
|
||||
@@ -279,7 +279,7 @@ public class KtPsiFactory(private val project: Project) {
|
||||
}
|
||||
|
||||
public fun createFunctionLiteralParameterList(text: String): KtParameterList {
|
||||
return (createExpression("{ $text -> 0}") as KtFunctionLiteralExpression).getFunctionLiteral().getValueParameterList()!!
|
||||
return (createExpression("{ $text -> 0}") as KtLambdaExpression).getFunctionLiteral().getValueParameterList()!!
|
||||
}
|
||||
|
||||
public fun createEnumEntry(text: String): KtEnumEntry {
|
||||
@@ -395,15 +395,15 @@ public class KtPsiFactory(private val project: Project) {
|
||||
return argumentList.getArguments().single()
|
||||
}
|
||||
|
||||
public fun createDelegatorToSuperCall(text: String): KtDelegatorToSuperCall {
|
||||
return createClass("class A: $text").getDelegationSpecifiers().first() as KtDelegatorToSuperCall
|
||||
public fun createSuperTypeCallEntry(text: String): KtSuperTypeCallEntry {
|
||||
return createClass("class A: $text").getSuperTypeListEntries().first() as KtSuperTypeCallEntry
|
||||
}
|
||||
|
||||
public fun createDelegatorToSuperClass(text: String): KtDelegatorToSuperClass {
|
||||
return createClass("class A: $text").getDelegationSpecifiers().first() as KtDelegatorToSuperClass
|
||||
public fun createSuperTypeEntry(text: String): KtSuperTypeEntry {
|
||||
return createClass("class A: $text").getSuperTypeListEntries().first() as KtSuperTypeEntry
|
||||
}
|
||||
|
||||
public fun createConstructorDelegationCall(text: String): KtConstructorDelegationCall {
|
||||
public fun creareDelegatedSuperTypeEntry(text: String): KtConstructorDelegationCall {
|
||||
val colonOrEmpty = if (text.isEmpty()) "" else ": "
|
||||
return createClass("class A { constructor()$colonOrEmpty$text {}").getSecondaryConstructors().first().getDelegationCall()
|
||||
}
|
||||
|
||||
@@ -298,8 +298,8 @@ public class KtPsiUtil {
|
||||
public static boolean isVariableNotParameterDeclaration(@NotNull KtDeclaration declaration) {
|
||||
if (!(declaration instanceof KtVariableDeclaration)) return false;
|
||||
if (declaration instanceof KtProperty) return true;
|
||||
assert declaration instanceof KtMultiDeclarationEntry;
|
||||
KtMultiDeclarationEntry multiDeclarationEntry = (KtMultiDeclarationEntry) declaration;
|
||||
assert declaration instanceof KtDestructuringDeclarationEntry;
|
||||
KtDestructuringDeclarationEntry multiDeclarationEntry = (KtDestructuringDeclarationEntry) declaration;
|
||||
return !(multiDeclarationEntry.getParent().getParent() instanceof KtForExpression);
|
||||
}
|
||||
|
||||
@@ -819,7 +819,7 @@ public class KtPsiUtil {
|
||||
parent instanceof KtDotQualifiedExpression ||
|
||||
parent instanceof KtCallExpression ||
|
||||
parent instanceof KtArrayAccessExpression ||
|
||||
parent instanceof KtMultiDeclaration) {
|
||||
parent instanceof KtDestructuringDeclaration) {
|
||||
|
||||
if (parent instanceof KtLabeledExpression) {
|
||||
parent = parent.getParent();
|
||||
@@ -835,7 +835,7 @@ public class KtPsiUtil {
|
||||
else if (parent instanceof KtValueArgument || parent instanceof KtValueArgumentList) {
|
||||
parent = parent.getParent();
|
||||
}
|
||||
else if (parent instanceof KtFunctionLiteralExpression || parent instanceof KtAnnotatedExpression) {
|
||||
else if (parent instanceof KtLambdaExpression || parent instanceof KtAnnotatedExpression) {
|
||||
parent = parent.getParent();
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -48,6 +48,6 @@ public class KtSecondaryConstructor : KtConstructor<KtSecondaryConstructor> {
|
||||
|
||||
val delegationName = if (isThis) "this" else "super"
|
||||
|
||||
return addAfter(psiFactory.createConstructorDelegationCall(delegationName + "()"), colon) as KtConstructorDelegationCall
|
||||
return addAfter(psiFactory.creareDelegatedSuperTypeEntry(delegationName + "()"), colon) as KtConstructorDelegationCall
|
||||
}
|
||||
}
|
||||
|
||||
+6
-6
@@ -26,18 +26,18 @@ import org.jetbrains.kotlin.psi.stubs.elements.KtStubElementTypes;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class KtDelegatorToSuperCall extends KtDelegationSpecifier implements KtCallElement {
|
||||
public KtDelegatorToSuperCall(@NotNull ASTNode node) {
|
||||
public class KtSuperTypeCallEntry extends KtSuperTypeListEntry implements KtCallElement {
|
||||
public KtSuperTypeCallEntry(@NotNull ASTNode node) {
|
||||
super(node);
|
||||
}
|
||||
|
||||
public KtDelegatorToSuperCall(@NotNull KotlinPlaceHolderStub<? extends KtDelegationSpecifier> stub) {
|
||||
super(stub, KtStubElementTypes.DELEGATOR_SUPER_CALL);
|
||||
public KtSuperTypeCallEntry(@NotNull KotlinPlaceHolderStub<? extends KtSuperTypeListEntry> stub) {
|
||||
super(stub, KtStubElementTypes.SUPER_TYPE_CALL_ENTRY);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <R, D> R accept(@NotNull KtVisitor<R, D> visitor, D data) {
|
||||
return visitor.visitDelegationToSuperCallSpecifier(this, data);
|
||||
return visitor.visitSuperTypeCallEntry(this, data);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@@ -61,7 +61,7 @@ public class KtDelegatorToSuperCall extends KtDelegationSpecifier implements KtC
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public List<KtFunctionLiteralArgument> getFunctionLiteralArguments() {
|
||||
public List<KtLambdaArgument> getLambdaArguments() {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
+5
-5
@@ -21,17 +21,17 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.kotlin.psi.stubs.KotlinPlaceHolderStub;
|
||||
import org.jetbrains.kotlin.psi.stubs.elements.KtStubElementTypes;
|
||||
|
||||
public class KtDelegatorToSuperClass extends KtDelegationSpecifier {
|
||||
public KtDelegatorToSuperClass(@NotNull ASTNode node) {
|
||||
public class KtSuperTypeEntry extends KtSuperTypeListEntry {
|
||||
public KtSuperTypeEntry(@NotNull ASTNode node) {
|
||||
super(node);
|
||||
}
|
||||
|
||||
public KtDelegatorToSuperClass(@NotNull KotlinPlaceHolderStub<? extends KtDelegationSpecifier> stub) {
|
||||
super(stub, KtStubElementTypes.DELEGATOR_SUPER_CLASS);
|
||||
public KtSuperTypeEntry(@NotNull KotlinPlaceHolderStub<? extends KtSuperTypeListEntry> stub) {
|
||||
super(stub, KtStubElementTypes.SUPER_TYPE_ENTRY);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <R, D> R accept(@NotNull KtVisitor<R, D> visitor, D data) {
|
||||
return visitor.visitDelegationToSuperClassSpecifier(this, data);
|
||||
return visitor.visitSuperTypeEntry(this, data);
|
||||
}
|
||||
}
|
||||
+7
-7
@@ -24,21 +24,21 @@ import org.jetbrains.kotlin.psi.stubs.elements.KtStubElementTypes;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class KtDelegationSpecifierList extends KtElementImplStub<KotlinPlaceHolderStub<KtDelegationSpecifierList>> {
|
||||
public KtDelegationSpecifierList(@NotNull ASTNode node) {
|
||||
public class KtSuperTypeList extends KtElementImplStub<KotlinPlaceHolderStub<KtSuperTypeList>> {
|
||||
public KtSuperTypeList(@NotNull ASTNode node) {
|
||||
super(node);
|
||||
}
|
||||
|
||||
public KtDelegationSpecifierList(@NotNull KotlinPlaceHolderStub<KtDelegationSpecifierList> stub) {
|
||||
super(stub, KtStubElementTypes.DELEGATION_SPECIFIER_LIST);
|
||||
public KtSuperTypeList(@NotNull KotlinPlaceHolderStub<KtSuperTypeList> stub) {
|
||||
super(stub, KtStubElementTypes.SUPER_TYPE_LIST);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <R, D> R accept(@NotNull KtVisitor<R, D> visitor, D data) {
|
||||
return visitor.visitDelegationSpecifierList(this, data);
|
||||
return visitor.visitSuperTypeList(this, data);
|
||||
}
|
||||
|
||||
public List<KtDelegationSpecifier> getDelegationSpecifiers() {
|
||||
return Arrays.asList(getStubOrPsiChildren(KtStubElementTypes.DELEGATION_SPECIFIER_TYPES, KtDelegationSpecifier.ARRAY_FACTORY));
|
||||
public List<KtSuperTypeListEntry> getEntries() {
|
||||
return Arrays.asList(getStubOrPsiChildren(KtStubElementTypes.SUPER_TYPE_LIST_ENTRIES, KtSuperTypeListEntry.ARRAY_FACTORY));
|
||||
}
|
||||
}
|
||||
+9
-9
@@ -24,31 +24,31 @@ import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.kotlin.psi.stubs.KotlinPlaceHolderStub;
|
||||
import org.jetbrains.kotlin.psi.stubs.elements.KtStubElementTypes;
|
||||
|
||||
public class KtDelegationSpecifier extends KtElementImplStub<KotlinPlaceHolderStub<? extends KtDelegationSpecifier>> {
|
||||
public class KtSuperTypeListEntry extends KtElementImplStub<KotlinPlaceHolderStub<? extends KtSuperTypeListEntry>> {
|
||||
|
||||
private static final KtDelegationSpecifier[] EMPTY_ARRAY = new KtDelegationSpecifier[0];
|
||||
private static final KtSuperTypeListEntry[] EMPTY_ARRAY = new KtSuperTypeListEntry[0];
|
||||
|
||||
public static ArrayFactory<KtDelegationSpecifier> ARRAY_FACTORY = new ArrayFactory<KtDelegationSpecifier>() {
|
||||
public static ArrayFactory<KtSuperTypeListEntry> ARRAY_FACTORY = new ArrayFactory<KtSuperTypeListEntry>() {
|
||||
@NotNull
|
||||
@Override
|
||||
public KtDelegationSpecifier[] create(int count) {
|
||||
return count == 0 ? EMPTY_ARRAY : new KtDelegationSpecifier[count];
|
||||
public KtSuperTypeListEntry[] create(int count) {
|
||||
return count == 0 ? EMPTY_ARRAY : new KtSuperTypeListEntry[count];
|
||||
}
|
||||
};
|
||||
|
||||
public KtDelegationSpecifier(@NotNull ASTNode node) {
|
||||
public KtSuperTypeListEntry(@NotNull ASTNode node) {
|
||||
super(node);
|
||||
}
|
||||
|
||||
public KtDelegationSpecifier(
|
||||
@NotNull KotlinPlaceHolderStub<? extends KtDelegationSpecifier> stub,
|
||||
public KtSuperTypeListEntry(
|
||||
@NotNull KotlinPlaceHolderStub<? extends KtSuperTypeListEntry> stub,
|
||||
@NotNull IStubElementType nodeType) {
|
||||
super(stub, nodeType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <R, D> R accept(@NotNull KtVisitor<R, D> visitor, D data) {
|
||||
return visitor.visitDelegationSpecifier(this, data);
|
||||
return visitor.visitSuperTypeListEntry(this, data);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@@ -57,11 +57,11 @@ public class KtVisitor<R, D> extends PsiElementVisitor {
|
||||
return visitNamedDeclaration(property, data);
|
||||
}
|
||||
|
||||
public R visitMultiDeclaration(@NotNull KtMultiDeclaration multiDeclaration, D data) {
|
||||
public R visitDestructuringDeclaration(@NotNull KtDestructuringDeclaration multiDeclaration, D data) {
|
||||
return visitDeclaration(multiDeclaration, data);
|
||||
}
|
||||
|
||||
public R visitMultiDeclarationEntry(@NotNull KtMultiDeclarationEntry multiDeclarationEntry, D data) {
|
||||
public R visitDestructuringDeclarationEntry(@NotNull KtDestructuringDeclarationEntry multiDeclarationEntry, D data) {
|
||||
return visitNamedDeclaration(multiDeclarationEntry, data);
|
||||
}
|
||||
|
||||
@@ -134,24 +134,24 @@ public class KtVisitor<R, D> extends PsiElementVisitor {
|
||||
return visitNamedDeclaration(parameter, data);
|
||||
}
|
||||
|
||||
public R visitDelegationSpecifierList(@NotNull KtDelegationSpecifierList list, D data) {
|
||||
public R visitSuperTypeList(@NotNull KtSuperTypeList list, D data) {
|
||||
return visitKtElement(list, data);
|
||||
}
|
||||
|
||||
public R visitDelegationSpecifier(@NotNull KtDelegationSpecifier specifier, D data) {
|
||||
public R visitSuperTypeListEntry(@NotNull KtSuperTypeListEntry specifier, D data) {
|
||||
return visitKtElement(specifier, data);
|
||||
}
|
||||
|
||||
public R visitDelegationByExpressionSpecifier(@NotNull KtDelegatorByExpressionSpecifier specifier, D data) {
|
||||
return visitDelegationSpecifier(specifier, data);
|
||||
public R visitDelegatedSuperTypeEntry(@NotNull KtDelegatedSuperTypeEntry specifier, D data) {
|
||||
return visitSuperTypeListEntry(specifier, data);
|
||||
}
|
||||
|
||||
public R visitDelegationToSuperCallSpecifier(@NotNull KtDelegatorToSuperCall call, D data) {
|
||||
return visitDelegationSpecifier(call, data);
|
||||
public R visitSuperTypeCallEntry(@NotNull KtSuperTypeCallEntry call, D data) {
|
||||
return visitSuperTypeListEntry(call, data);
|
||||
}
|
||||
|
||||
public R visitDelegationToSuperClassSpecifier(@NotNull KtDelegatorToSuperClass specifier, D data) {
|
||||
return visitDelegationSpecifier(specifier, data);
|
||||
public R visitSuperTypeEntry(@NotNull KtSuperTypeEntry specifier, D data) {
|
||||
return visitSuperTypeListEntry(specifier, data);
|
||||
}
|
||||
|
||||
public R visitConstructorDelegationCall(@NotNull KtConstructorDelegationCall call, D data) {
|
||||
@@ -258,7 +258,7 @@ public class KtVisitor<R, D> extends PsiElementVisitor {
|
||||
return visitLoopExpression(expression, data);
|
||||
}
|
||||
|
||||
public R visitFunctionLiteralExpression(@NotNull KtFunctionLiteralExpression expression, D data) {
|
||||
public R visitLambdaExpression(@NotNull KtLambdaExpression expression, D data) {
|
||||
return visitExpression(expression, data);
|
||||
}
|
||||
|
||||
|
||||
@@ -53,12 +53,12 @@ public class KtVisitorVoid extends KtVisitor<Void, Void> {
|
||||
super.visitProperty(property, null);
|
||||
}
|
||||
|
||||
public void visitMultiDeclaration(@NotNull KtMultiDeclaration multiDeclaration) {
|
||||
super.visitMultiDeclaration(multiDeclaration, null);
|
||||
public void visitDestructuringDeclaration(@NotNull KtDestructuringDeclaration destructuringDeclaration) {
|
||||
super.visitDestructuringDeclaration(destructuringDeclaration, null);
|
||||
}
|
||||
|
||||
public void visitMultiDeclarationEntry(@NotNull KtMultiDeclarationEntry multiDeclarationEntry) {
|
||||
super.visitMultiDeclarationEntry(multiDeclarationEntry, null);
|
||||
public void visitDestructuringDeclarationEntry(@NotNull KtDestructuringDeclarationEntry multiDeclarationEntry) {
|
||||
super.visitDestructuringDeclarationEntry(multiDeclarationEntry, null);
|
||||
}
|
||||
|
||||
public void visitTypedef(@NotNull KtTypedef typedef) {
|
||||
@@ -121,24 +121,24 @@ public class KtVisitorVoid extends KtVisitor<Void, Void> {
|
||||
super.visitParameter(parameter, null);
|
||||
}
|
||||
|
||||
public void visitDelegationSpecifierList(@NotNull KtDelegationSpecifierList list) {
|
||||
super.visitDelegationSpecifierList(list, null);
|
||||
public void visitSuperTypeList(@NotNull KtSuperTypeList list) {
|
||||
super.visitSuperTypeList(list, null);
|
||||
}
|
||||
|
||||
public void visitDelegationSpecifier(@NotNull KtDelegationSpecifier specifier) {
|
||||
super.visitDelegationSpecifier(specifier, null);
|
||||
public void visitSuperTypeListEntry(@NotNull KtSuperTypeListEntry specifier) {
|
||||
super.visitSuperTypeListEntry(specifier, null);
|
||||
}
|
||||
|
||||
public void visitDelegationByExpressionSpecifier(@NotNull KtDelegatorByExpressionSpecifier specifier) {
|
||||
super.visitDelegationByExpressionSpecifier(specifier, null);
|
||||
public void visitDelegatedSuperTypeEntry(@NotNull KtDelegatedSuperTypeEntry specifier) {
|
||||
super.visitDelegatedSuperTypeEntry(specifier, null);
|
||||
}
|
||||
|
||||
public void visitDelegationToSuperCallSpecifier(@NotNull KtDelegatorToSuperCall call) {
|
||||
super.visitDelegationToSuperCallSpecifier(call, null);
|
||||
public void visitSuperTypeCallEntry(@NotNull KtSuperTypeCallEntry call) {
|
||||
super.visitSuperTypeCallEntry(call, null);
|
||||
}
|
||||
|
||||
public void visitDelegationToSuperClassSpecifier(@NotNull KtDelegatorToSuperClass specifier) {
|
||||
super.visitDelegationToSuperClassSpecifier(specifier, null);
|
||||
public void visitSuperTypeEntry(@NotNull KtSuperTypeEntry specifier) {
|
||||
super.visitSuperTypeEntry(specifier, null);
|
||||
}
|
||||
|
||||
public void visitConstructorDelegationCall(@NotNull KtConstructorDelegationCall call) {
|
||||
@@ -245,8 +245,8 @@ public class KtVisitorVoid extends KtVisitor<Void, Void> {
|
||||
super.visitDoWhileExpression(expression, null);
|
||||
}
|
||||
|
||||
public void visitFunctionLiteralExpression(@NotNull KtFunctionLiteralExpression expression) {
|
||||
super.visitFunctionLiteralExpression(expression, null);
|
||||
public void visitLambdaExpression(@NotNull KtLambdaExpression lambdaExpression) {
|
||||
super.visitLambdaExpression(lambdaExpression, null);
|
||||
}
|
||||
|
||||
public void visitAnnotatedExpression(@NotNull KtAnnotatedExpression expression) {
|
||||
@@ -487,14 +487,14 @@ public class KtVisitorVoid extends KtVisitor<Void, Void> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Void visitMultiDeclaration(@NotNull KtMultiDeclaration multiDeclaration, Void data) {
|
||||
visitMultiDeclaration(multiDeclaration);
|
||||
public final Void visitDestructuringDeclaration(@NotNull KtDestructuringDeclaration multiDeclaration, Void data) {
|
||||
visitDestructuringDeclaration(multiDeclaration);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Void visitMultiDeclarationEntry(@NotNull KtMultiDeclarationEntry multiDeclarationEntry, Void data) {
|
||||
visitMultiDeclarationEntry(multiDeclarationEntry);
|
||||
public final Void visitDestructuringDeclarationEntry(@NotNull KtDestructuringDeclarationEntry multiDeclarationEntry, Void data) {
|
||||
visitDestructuringDeclarationEntry(multiDeclarationEntry);
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -589,34 +589,34 @@ public class KtVisitorVoid extends KtVisitor<Void, Void> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Void visitDelegationSpecifierList(@NotNull KtDelegationSpecifierList list, Void data) {
|
||||
visitDelegationSpecifierList(list);
|
||||
public final Void visitSuperTypeList(@NotNull KtSuperTypeList list, Void data) {
|
||||
visitSuperTypeList(list);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Void visitDelegationSpecifier(@NotNull KtDelegationSpecifier specifier, Void data) {
|
||||
visitDelegationSpecifier(specifier);
|
||||
public final Void visitSuperTypeListEntry(@NotNull KtSuperTypeListEntry specifier, Void data) {
|
||||
visitSuperTypeListEntry(specifier);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Void visitDelegationByExpressionSpecifier(
|
||||
@NotNull KtDelegatorByExpressionSpecifier specifier, Void data
|
||||
public final Void visitDelegatedSuperTypeEntry(
|
||||
@NotNull KtDelegatedSuperTypeEntry specifier, Void data
|
||||
) {
|
||||
visitDelegationByExpressionSpecifier(specifier);
|
||||
visitDelegatedSuperTypeEntry(specifier);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Void visitDelegationToSuperCallSpecifier(@NotNull KtDelegatorToSuperCall call, Void data) {
|
||||
visitDelegationToSuperCallSpecifier(call);
|
||||
public final Void visitSuperTypeCallEntry(@NotNull KtSuperTypeCallEntry call, Void data) {
|
||||
visitSuperTypeCallEntry(call);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Void visitDelegationToSuperClassSpecifier(@NotNull KtDelegatorToSuperClass specifier, Void data) {
|
||||
visitDelegationToSuperClassSpecifier(specifier);
|
||||
public final Void visitSuperTypeEntry(@NotNull KtSuperTypeEntry specifier, Void data) {
|
||||
visitSuperTypeEntry(specifier);
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -777,8 +777,8 @@ public class KtVisitorVoid extends KtVisitor<Void, Void> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Void visitFunctionLiteralExpression(@NotNull KtFunctionLiteralExpression expression, Void data) {
|
||||
visitFunctionLiteralExpression(expression);
|
||||
public final Void visitLambdaExpression(@NotNull KtLambdaExpression expression, Void data) {
|
||||
visitLambdaExpression(expression);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -50,12 +50,12 @@ public class KtVisitorVoidWithParameter<P> extends KtVisitor<Void, P> {
|
||||
super.visitProperty(property, data);
|
||||
}
|
||||
|
||||
public void visitMultiDeclarationVoid(@NotNull KtMultiDeclaration multiDeclaration, P data) {
|
||||
super.visitMultiDeclaration(multiDeclaration, data);
|
||||
public void visitDestructuringDeclarationVoid(@NotNull KtDestructuringDeclaration multiDeclaration, P data) {
|
||||
super.visitDestructuringDeclaration(multiDeclaration, data);
|
||||
}
|
||||
|
||||
public void visitMultiDeclarationEntryVoid(@NotNull KtMultiDeclarationEntry multiDeclarationEntry, P data) {
|
||||
super.visitMultiDeclarationEntry(multiDeclarationEntry, data);
|
||||
public void visitDestructuringDeclarationEntryVoid(@NotNull KtDestructuringDeclarationEntry multiDeclarationEntry, P data) {
|
||||
super.visitDestructuringDeclarationEntry(multiDeclarationEntry, data);
|
||||
}
|
||||
|
||||
public void visitTypedefVoid(@NotNull KtTypedef typedef, P data) {
|
||||
@@ -118,27 +118,27 @@ public class KtVisitorVoidWithParameter<P> extends KtVisitor<Void, P> {
|
||||
super.visitParameter(parameter, data);
|
||||
}
|
||||
|
||||
public void visitDelegationSpecifierListVoid(@NotNull KtDelegationSpecifierList list, P data) {
|
||||
super.visitDelegationSpecifierList(list, data);
|
||||
public void visitSuperTypeListVoid(@NotNull KtSuperTypeList list, P data) {
|
||||
super.visitSuperTypeList(list, data);
|
||||
}
|
||||
|
||||
public void visitDelegationSpecifierVoid(@NotNull KtDelegationSpecifier specifier, P data) {
|
||||
super.visitDelegationSpecifier(specifier, data);
|
||||
public void visitSuperTypeListEntryVoid(@NotNull KtSuperTypeListEntry specifier, P data) {
|
||||
super.visitSuperTypeListEntry(specifier, data);
|
||||
}
|
||||
|
||||
public void visitDelegationByExpressionSpecifierVoid(@NotNull KtDelegatorByExpressionSpecifier specifier, P data) {
|
||||
super.visitDelegationByExpressionSpecifier(specifier, data);
|
||||
public void visitDelegatedSuperTypeEntryVoid(@NotNull KtDelegatedSuperTypeEntry specifier, P data) {
|
||||
super.visitDelegatedSuperTypeEntry(specifier, data);
|
||||
}
|
||||
|
||||
public void visitDelegationToSuperCallSpecifierVoid(@NotNull KtDelegatorToSuperCall call, P data) {
|
||||
super.visitDelegationToSuperCallSpecifier(call, data);
|
||||
public void visitSuperTypeCallEntryVoid(@NotNull KtSuperTypeCallEntry call, P data) {
|
||||
super.visitSuperTypeCallEntry(call, data);
|
||||
}
|
||||
|
||||
public void visitDelegationToSuperClassSpecifierVoid(@NotNull KtDelegatorToSuperClass specifier, P data) {
|
||||
super.visitDelegationToSuperClassSpecifier(specifier, data);
|
||||
public void visitSuperTypeEntryVoid(@NotNull KtSuperTypeEntry specifier, P data) {
|
||||
super.visitSuperTypeEntry(specifier, data);
|
||||
}
|
||||
|
||||
public void visitDelegationCallVoid(@NotNull KtConstructorDelegationCall call, P data) {
|
||||
public void visitConstructorDelegationCallVoid(@NotNull KtConstructorDelegationCall call, P data) {
|
||||
super.visitConstructorDelegationCall(call, data);
|
||||
}
|
||||
|
||||
@@ -242,8 +242,8 @@ public class KtVisitorVoidWithParameter<P> extends KtVisitor<Void, P> {
|
||||
super.visitDoWhileExpression(expression, data);
|
||||
}
|
||||
|
||||
public void visitFunctionLiteralExpressionVoid(@NotNull KtFunctionLiteralExpression expression, P data) {
|
||||
super.visitFunctionLiteralExpression(expression, data);
|
||||
public void visitLambdaExpressionVoid(@NotNull KtLambdaExpression expression, P data) {
|
||||
super.visitLambdaExpression(expression, data);
|
||||
}
|
||||
|
||||
public void visitAnnotatedExpressionVoid(@NotNull KtAnnotatedExpression expression, P data) {
|
||||
@@ -460,14 +460,14 @@ public class KtVisitorVoidWithParameter<P> extends KtVisitor<Void, P> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Void visitMultiDeclaration(@NotNull KtMultiDeclaration multiDeclaration, P data) {
|
||||
visitMultiDeclarationVoid(multiDeclaration, data);
|
||||
public final Void visitDestructuringDeclaration(@NotNull KtDestructuringDeclaration multiDeclaration, P data) {
|
||||
visitDestructuringDeclarationVoid(multiDeclaration, data);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Void visitMultiDeclarationEntry(@NotNull KtMultiDeclarationEntry multiDeclarationEntry, P data) {
|
||||
visitMultiDeclarationEntryVoid(multiDeclarationEntry, data);
|
||||
public final Void visitDestructuringDeclarationEntry(@NotNull KtDestructuringDeclarationEntry multiDeclarationEntry, P data) {
|
||||
visitDestructuringDeclarationEntryVoid(multiDeclarationEntry, data);
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -556,40 +556,40 @@ public class KtVisitorVoidWithParameter<P> extends KtVisitor<Void, P> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Void visitDelegationSpecifierList(@NotNull KtDelegationSpecifierList list, P data) {
|
||||
visitDelegationSpecifierListVoid(list, data);
|
||||
public final Void visitSuperTypeList(@NotNull KtSuperTypeList list, P data) {
|
||||
visitSuperTypeListVoid(list, data);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Void visitDelegationSpecifier(@NotNull KtDelegationSpecifier specifier, P data) {
|
||||
visitDelegationSpecifierVoid(specifier, data);
|
||||
public final Void visitSuperTypeListEntry(@NotNull KtSuperTypeListEntry specifier, P data) {
|
||||
visitSuperTypeListEntryVoid(specifier, data);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Void visitDelegationByExpressionSpecifier(
|
||||
@NotNull KtDelegatorByExpressionSpecifier specifier, P data
|
||||
public final Void visitDelegatedSuperTypeEntry(
|
||||
@NotNull KtDelegatedSuperTypeEntry specifier, P data
|
||||
) {
|
||||
visitDelegationByExpressionSpecifierVoid(specifier, data);
|
||||
visitDelegatedSuperTypeEntryVoid(specifier, data);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Void visitDelegationToSuperCallSpecifier(@NotNull KtDelegatorToSuperCall call, P data) {
|
||||
visitDelegationToSuperCallSpecifierVoid(call, data);
|
||||
public final Void visitSuperTypeCallEntry(@NotNull KtSuperTypeCallEntry call, P data) {
|
||||
visitSuperTypeCallEntryVoid(call, data);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Void visitDelegationToSuperClassSpecifier(@NotNull KtDelegatorToSuperClass specifier, P data) {
|
||||
visitDelegationToSuperClassSpecifierVoid(specifier, data);
|
||||
public final Void visitSuperTypeEntry(@NotNull KtSuperTypeEntry specifier, P data) {
|
||||
visitSuperTypeEntryVoid(specifier, data);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Void visitConstructorDelegationCall(@NotNull KtConstructorDelegationCall call, P data) {
|
||||
visitDelegationCallVoid(call, data);
|
||||
visitConstructorDelegationCallVoid(call, data);
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -744,8 +744,8 @@ public class KtVisitorVoidWithParameter<P> extends KtVisitor<Void, P> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Void visitFunctionLiteralExpression(@NotNull KtFunctionLiteralExpression expression, P data) {
|
||||
visitFunctionLiteralExpressionVoid(expression, data);
|
||||
public final Void visitLambdaExpression(@NotNull KtLambdaExpression expression, P data) {
|
||||
visitLambdaExpressionVoid(expression, data);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -36,8 +36,8 @@ public interface ValueArgument {
|
||||
public fun isExternal(): Boolean
|
||||
}
|
||||
|
||||
public interface FunctionLiteralArgument : ValueArgument {
|
||||
public fun getFunctionLiteral(): KtFunctionLiteralExpression
|
||||
public interface LambdaArgument : ValueArgument {
|
||||
public fun getLambdaExpression(): KtLambdaExpression
|
||||
|
||||
override fun getArgumentExpression(): KtExpression
|
||||
}
|
||||
|
||||
@@ -164,7 +164,7 @@ public fun <TElement : KtElement> createByPattern(pattern: String, vararg args:
|
||||
for ((pointer, n) in pointers) {
|
||||
var element = pointer.getElement()!!
|
||||
if (element is KtFunctionLiteral) {
|
||||
element = element.getParent() as KtFunctionLiteralExpression
|
||||
element = element.getParent() as KtLambdaExpression
|
||||
}
|
||||
(argumentTypes[n] as PsiElementPlaceholderArgumentType<in Any, in PsiElement>).replacePlaceholderElement(element, args[n])
|
||||
}
|
||||
|
||||
@@ -232,7 +232,7 @@ public fun StubBasedPsiElementBase<out KotlinClassOrObjectStub<out KtClassOrObje
|
||||
return stub.getSuperNames()
|
||||
}
|
||||
|
||||
val specifiers = (this as KtClassOrObject).getDelegationSpecifiers()
|
||||
val specifiers = (this as KtClassOrObject).getSuperTypeListEntries()
|
||||
if (specifiers.isEmpty()) return Collections.emptyList<String>()
|
||||
|
||||
val result = ArrayList<String>()
|
||||
@@ -351,11 +351,11 @@ public fun KtSimpleNameExpression.isPackageDirectiveExpression(): Boolean {
|
||||
return parent is KtPackageDirective || parent?.getParent() is KtPackageDirective
|
||||
}
|
||||
|
||||
public fun KtExpression.isFunctionLiteralOutsideParentheses(): Boolean {
|
||||
public fun KtExpression.isLambdaOutsideParentheses(): Boolean {
|
||||
val parent = getParent()
|
||||
return when (parent) {
|
||||
is KtFunctionLiteralArgument -> true
|
||||
is KtLabeledExpression -> parent.isFunctionLiteralOutsideParentheses()
|
||||
is KtLambdaArgument -> true
|
||||
is KtLabeledExpression -> parent.isLambdaOutsideParentheses()
|
||||
else -> false
|
||||
}
|
||||
}
|
||||
@@ -387,7 +387,7 @@ public fun KtNamedDeclaration.getValueParameterList(): KtParameterList? {
|
||||
}
|
||||
}
|
||||
|
||||
public fun KtFunctionLiteralArgument.getFunctionLiteralArgumentName(bindingContext: BindingContext): Name? {
|
||||
public fun KtLambdaArgument.getLambdaArgumentName(bindingContext: BindingContext): Name? {
|
||||
val callExpression = getParent() as KtCallExpression
|
||||
val resolvedCall = callExpression.getResolvedCall(bindingContext)
|
||||
return (resolvedCall?.getArgumentMapping(this) as? ArgumentMatch)?.valueParameter?.getName()
|
||||
|
||||
+9
-9
@@ -100,19 +100,19 @@ public interface KtStubElementTypes {
|
||||
KtPlaceHolderStubElementType<KtTypeArgumentList> TYPE_ARGUMENT_LIST =
|
||||
new KtPlaceHolderStubElementType<KtTypeArgumentList>("TYPE_ARGUMENT_LIST", KtTypeArgumentList.class);
|
||||
|
||||
KtPlaceHolderStubElementType<KtDelegationSpecifierList> DELEGATION_SPECIFIER_LIST =
|
||||
new KtPlaceHolderStubElementType<KtDelegationSpecifierList>("DELEGATION_SPECIFIER_LIST", KtDelegationSpecifierList.class);
|
||||
KtPlaceHolderStubElementType<KtSuperTypeList> SUPER_TYPE_LIST =
|
||||
new KtPlaceHolderStubElementType<KtSuperTypeList>("SUPER_TYPE_LIST", KtSuperTypeList.class);
|
||||
|
||||
KtPlaceHolderStubElementType<KtInitializerList> INITIALIZER_LIST =
|
||||
new KtPlaceHolderStubElementType<KtInitializerList>("INITIALIZER_LIST", KtInitializerList.class);
|
||||
|
||||
KtPlaceHolderStubElementType<KtDelegatorByExpressionSpecifier> DELEGATOR_BY =
|
||||
new KtPlaceHolderStubElementType<KtDelegatorByExpressionSpecifier>("DELEGATOR_BY", KtDelegatorByExpressionSpecifier.class);
|
||||
KtPlaceHolderStubElementType<KtDelegatedSuperTypeEntry> DELEGATED_SUPER_TYPE_ENTRY =
|
||||
new KtPlaceHolderStubElementType<KtDelegatedSuperTypeEntry>("DELEGATED_SUPER_TYPE_ENTRY", KtDelegatedSuperTypeEntry.class);
|
||||
|
||||
KtPlaceHolderStubElementType<KtDelegatorToSuperCall> DELEGATOR_SUPER_CALL =
|
||||
new KtPlaceHolderStubElementType<KtDelegatorToSuperCall>("DELEGATOR_SUPER_CALL", KtDelegatorToSuperCall.class);
|
||||
KtPlaceHolderStubElementType<KtDelegatorToSuperClass> DELEGATOR_SUPER_CLASS =
|
||||
new KtPlaceHolderStubElementType<KtDelegatorToSuperClass>("DELEGATOR_SUPER_CLASS", KtDelegatorToSuperClass.class);
|
||||
KtPlaceHolderStubElementType<KtSuperTypeCallEntry> SUPER_TYPE_CALL_ENTRY =
|
||||
new KtPlaceHolderStubElementType<KtSuperTypeCallEntry>("SUPER_TYPE_CALL_ENTRY", KtSuperTypeCallEntry.class);
|
||||
KtPlaceHolderStubElementType<KtSuperTypeEntry> SUPER_TYPE_ENTRY =
|
||||
new KtPlaceHolderStubElementType<KtSuperTypeEntry>("SUPER_TYPE_ENTRY", KtSuperTypeEntry.class);
|
||||
KtPlaceHolderStubElementType<KtConstructorCalleeExpression> CONSTRUCTOR_CALLEE =
|
||||
new KtPlaceHolderStubElementType<KtConstructorCalleeExpression>("CONSTRUCTOR_CALLEE", KtConstructorCalleeExpression.class);
|
||||
|
||||
@@ -121,7 +121,7 @@ public interface KtStubElementTypes {
|
||||
TokenSet DECLARATION_TYPES =
|
||||
TokenSet.create(CLASS, OBJECT_DECLARATION, FUNCTION, PROPERTY, CLASS_INITIALIZER, SECONDARY_CONSTRUCTOR, ENUM_ENTRY);
|
||||
|
||||
TokenSet DELEGATION_SPECIFIER_TYPES = TokenSet.create(DELEGATOR_BY, DELEGATOR_SUPER_CALL, DELEGATOR_SUPER_CLASS);
|
||||
TokenSet SUPER_TYPE_LIST_ENTRIES = TokenSet.create(DELEGATED_SUPER_TYPE_ENTRY, SUPER_TYPE_CALL_ENTRY, SUPER_TYPE_ENTRY);
|
||||
|
||||
TokenSet TYPE_ELEMENT_TYPES = TokenSet.create(USER_TYPE, NULLABLE_TYPE, FUNCTION_TYPE, DYNAMIC_TYPE, SELF_TYPE);
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ public class AnnotationChecker(private val additionalCheckers: Iterable<Addition
|
||||
|
||||
public fun checkExpression(expression: KtExpression, trace: BindingTrace) {
|
||||
checkEntries(expression.getAnnotationEntries(), getActualTargetList(expression, null), trace)
|
||||
if (expression is KtFunctionLiteralExpression) {
|
||||
if (expression is KtLambdaExpression) {
|
||||
for (parameter in expression.valueParameters) {
|
||||
parameter.typeReference?.let { check(it, trace) }
|
||||
}
|
||||
@@ -112,7 +112,7 @@ public class AnnotationChecker(private val additionalCheckers: Iterable<Addition
|
||||
val retention = descriptor.type.constructor.declarationDescriptor?.getAnnotationRetention()
|
||||
if (retention == KotlinRetention.SOURCE) return
|
||||
|
||||
val functionLiteralExpression = annotatedExpression.baseExpression as? KtFunctionLiteralExpression ?: return
|
||||
val functionLiteralExpression = annotatedExpression.baseExpression as? KtLambdaExpression ?: return
|
||||
if (InlineUtil.isInlinedArgument(functionLiteralExpression.functionLiteral, trace.bindingContext, false)) {
|
||||
trace.report(Errors.NON_SOURCE_ANNOTATION_ON_INLINED_LAMBDA_EXPRESSION.on(entry))
|
||||
}
|
||||
@@ -170,7 +170,7 @@ public class AnnotationChecker(private val additionalCheckers: Iterable<Addition
|
||||
return when (annotated) {
|
||||
is KtClassOrObject ->
|
||||
(descriptor as? ClassDescriptor)?.let { TargetList(KotlinTarget.classActualTargets(it)) } ?: TargetLists.T_CLASSIFIER
|
||||
is KtMultiDeclarationEntry -> TargetLists.T_LOCAL_VARIABLE
|
||||
is KtDestructuringDeclarationEntry -> TargetLists.T_LOCAL_VARIABLE
|
||||
is KtProperty -> {
|
||||
if (annotated.isLocal)
|
||||
TargetLists.T_LOCAL_VARIABLE
|
||||
@@ -203,8 +203,8 @@ public class AnnotationChecker(private val additionalCheckers: Iterable<Addition
|
||||
is KtTypeProjection ->
|
||||
if (annotated.projectionKind == KtProjectionKind.STAR) TargetLists.T_STAR_PROJECTION else TargetLists.T_TYPE_PROJECTION
|
||||
is KtAnonymousInitializer -> TargetLists.T_INITIALIZER
|
||||
is KtMultiDeclaration -> TargetLists.T_DESTRUCTURING_DECLARATION
|
||||
is KtFunctionLiteralExpression -> TargetLists.T_FUNCTION_LITERAL
|
||||
is KtDestructuringDeclaration -> TargetLists.T_DESTRUCTURING_DECLARATION
|
||||
is KtLambdaExpression -> TargetLists.T_FUNCTION_LITERAL
|
||||
is KtObjectLiteralExpression -> TargetLists.T_OBJECT_LITERAL
|
||||
is KtExpression -> TargetLists.T_EXPRESSION
|
||||
else -> TargetLists.EMPTY
|
||||
|
||||
@@ -125,7 +125,7 @@ public interface BindingContext {
|
||||
|
||||
WritableSlice<PropertyDescriptor, ResolvedCall<FunctionDescriptor>> DELEGATED_PROPERTY_PD_RESOLVED_CALL = Slices.createSimpleSlice();
|
||||
|
||||
WritableSlice<KtMultiDeclarationEntry, ResolvedCall<FunctionDescriptor>> COMPONENT_RESOLVED_CALL = Slices.createSimpleSlice();
|
||||
WritableSlice<KtDestructuringDeclarationEntry, ResolvedCall<FunctionDescriptor>> COMPONENT_RESOLVED_CALL = Slices.createSimpleSlice();
|
||||
|
||||
WritableSlice<KtExpression, ResolvedCall<FunctionDescriptor>> INDEXED_LVALUE_GET = Slices.createSimpleSlice();
|
||||
WritableSlice<KtExpression, ResolvedCall<FunctionDescriptor>> INDEXED_LVALUE_SET = Slices.createSimpleSlice();
|
||||
@@ -189,9 +189,9 @@ public interface BindingContext {
|
||||
};
|
||||
WritableSlice<PropertyDescriptor, Boolean> IS_UNINITIALIZED = Slices.createSimpleSetSlice();
|
||||
|
||||
WritableSlice<KtFunctionLiteralExpression, Boolean> BLOCK = new Slices.SetSlice<KtFunctionLiteralExpression>(DO_NOTHING) {
|
||||
WritableSlice<KtLambdaExpression, Boolean> BLOCK = new Slices.SetSlice<KtLambdaExpression>(DO_NOTHING) {
|
||||
@Override
|
||||
public Boolean computeValue(SlicedMap map, KtFunctionLiteralExpression expression, Boolean isBlock, boolean valueNotFound) {
|
||||
public Boolean computeValue(SlicedMap map, KtLambdaExpression expression, Boolean isBlock, boolean valueNotFound) {
|
||||
isBlock = valueNotFound ? false : isBlock;
|
||||
return isBlock && !expression.getFunctionLiteral().hasParameterSpecification();
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ public class BodyResolver {
|
||||
}
|
||||
|
||||
private void resolveBehaviorDeclarationBodies(@NotNull BodiesResolveContext c) {
|
||||
resolveDelegationSpecifierLists(c);
|
||||
resolveSuperTypeEntryLists(c);
|
||||
|
||||
resolvePropertyDeclarationBodies(c);
|
||||
|
||||
@@ -231,20 +231,20 @@ public class BodyResolver {
|
||||
functionAnalyzerExtension.process(c);
|
||||
}
|
||||
|
||||
private void resolveDelegationSpecifierLists(@NotNull BodiesResolveContext c) {
|
||||
private void resolveSuperTypeEntryLists(@NotNull BodiesResolveContext c) {
|
||||
// TODO : Make sure the same thing is not initialized twice
|
||||
for (Map.Entry<KtClassOrObject, ClassDescriptorWithResolutionScopes> entry : c.getDeclaredClasses().entrySet()) {
|
||||
KtClassOrObject classOrObject = entry.getKey();
|
||||
ClassDescriptorWithResolutionScopes descriptor = entry.getValue();
|
||||
|
||||
resolveDelegationSpecifierList(c.getOuterDataFlowInfo(), classOrObject, descriptor,
|
||||
descriptor.getUnsubstitutedPrimaryConstructor(),
|
||||
descriptor.getScopeForConstructorHeaderResolution(),
|
||||
descriptor.getScopeForMemberDeclarationResolution());
|
||||
resolveSuperTypeEntryList(c.getOuterDataFlowInfo(), classOrObject, descriptor,
|
||||
descriptor.getUnsubstitutedPrimaryConstructor(),
|
||||
descriptor.getScopeForConstructorHeaderResolution(),
|
||||
descriptor.getScopeForMemberDeclarationResolution());
|
||||
}
|
||||
}
|
||||
|
||||
public void resolveDelegationSpecifierList(
|
||||
public void resolveSuperTypeEntryList(
|
||||
@NotNull final DataFlowInfo outerDataFlowInfo,
|
||||
@NotNull KtClassOrObject jetClass,
|
||||
@NotNull final ClassDescriptor descriptor,
|
||||
@@ -267,7 +267,7 @@ public class BodyResolver {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visitDelegationByExpressionSpecifier(@NotNull KtDelegatorByExpressionSpecifier specifier) {
|
||||
public void visitDelegatedSuperTypeEntry(@NotNull KtDelegatedSuperTypeEntry specifier) {
|
||||
if (descriptor.getKind() == ClassKind.INTERFACE) {
|
||||
trace.report(DELEGATION_IN_INTERFACE.on(specifier));
|
||||
}
|
||||
@@ -294,7 +294,7 @@ public class BodyResolver {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visitDelegationToSuperCallSpecifier(@NotNull KtDelegatorToSuperCall call) {
|
||||
public void visitSuperTypeCallEntry(@NotNull KtSuperTypeCallEntry call) {
|
||||
KtValueArgumentList valueArgumentList = call.getValueArgumentList();
|
||||
PsiElement elementToMark = valueArgumentList == null ? call : valueArgumentList;
|
||||
if (descriptor.getKind() == ClassKind.INTERFACE) {
|
||||
@@ -336,7 +336,7 @@ public class BodyResolver {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visitDelegationToSuperClassSpecifier(@NotNull KtDelegatorToSuperClass specifier) {
|
||||
public void visitSuperTypeEntry(@NotNull KtSuperTypeEntry specifier) {
|
||||
KtTypeReference typeReference = specifier.getTypeReference();
|
||||
KotlinType supertype = trace.getBindingContext().get(BindingContext.TYPE, typeReference);
|
||||
recordSupertype(typeReference, supertype);
|
||||
@@ -363,12 +363,12 @@ public class BodyResolver {
|
||||
}
|
||||
};
|
||||
|
||||
for (KtDelegationSpecifier delegationSpecifier : jetClass.getDelegationSpecifiers()) {
|
||||
for (KtSuperTypeListEntry delegationSpecifier : jetClass.getSuperTypeListEntries()) {
|
||||
delegationSpecifier.accept(visitor);
|
||||
}
|
||||
|
||||
if (DescriptorUtils.isAnnotationClass(descriptor) && jetClass.getDelegationSpecifierList() != null) {
|
||||
trace.report(SUPERTYPES_FOR_ANNOTATION_CLASS.on(jetClass.getDelegationSpecifierList()));
|
||||
if (DescriptorUtils.isAnnotationClass(descriptor) && jetClass.getSuperTypeList() != null) {
|
||||
trace.report(SUPERTYPES_FOR_ANNOTATION_CLASS.on(jetClass.getSuperTypeList()));
|
||||
}
|
||||
|
||||
if (primaryConstructorDelegationCall[0] != null && primaryConstructor != null) {
|
||||
|
||||
@@ -149,7 +149,7 @@ class DeclarationsChecker(
|
||||
private fun checkTypesInClassHeader(classOrObject: KtClassOrObject) {
|
||||
fun KtTypeReference.type(): KotlinType? = trace.bindingContext.get(TYPE, this)
|
||||
|
||||
for (delegationSpecifier in classOrObject.getDelegationSpecifiers()) {
|
||||
for (delegationSpecifier in classOrObject.getSuperTypeListEntries()) {
|
||||
val typeReference = delegationSpecifier.typeReference ?: continue
|
||||
typeReference.type()?.let { DescriptorResolver.checkBounds(typeReference, it, trace) }
|
||||
typeReference.checkNotEnumEntry(trace)
|
||||
@@ -212,7 +212,7 @@ class DeclarationsChecker(
|
||||
val containingDeclaration = typeParameterDescriptor.containingDeclaration as? ClassDescriptor
|
||||
?: throw AssertionError("Not a class descriptor: " + typeParameterDescriptor.containingDeclaration)
|
||||
if (sourceElement is KtClassOrObject) {
|
||||
val delegationSpecifierList = sourceElement.getDelegationSpecifierList() ?: continue
|
||||
val delegationSpecifierList = sourceElement.getSuperTypeList() ?: continue
|
||||
trace.report(INCONSISTENT_TYPE_PARAMETER_VALUES.on(
|
||||
delegationSpecifierList, typeParameterDescriptor, containingDeclaration, conflictingTypes
|
||||
))
|
||||
@@ -252,7 +252,7 @@ class DeclarationsChecker(
|
||||
private fun checkExposedSupertypes(klass: KtClassOrObject, classDescriptor: ClassDescriptor) {
|
||||
val classVisibility = classDescriptor.effectiveVisibility()
|
||||
val isInterface = classDescriptor.kind == ClassKind.INTERFACE
|
||||
val delegationList = klass.getDelegationSpecifiers()
|
||||
val delegationList = klass.getSuperTypeListEntries()
|
||||
classDescriptor.typeConstructor.supertypes.forEachIndexed { i, superType ->
|
||||
if (i >= delegationList.size) return
|
||||
val superDescriptor = TypeUtils.getClassDescriptor(superType) ?: return@forEachIndexed
|
||||
|
||||
@@ -20,7 +20,7 @@ import org.jetbrains.kotlin.descriptors.*
|
||||
import org.jetbrains.kotlin.descriptors.CallableMemberDescriptor.Kind.DELEGATION
|
||||
import org.jetbrains.kotlin.diagnostics.Errors.MANY_IMPL_MEMBER_NOT_IMPLEMENTED
|
||||
import org.jetbrains.kotlin.psi.KtClassOrObject
|
||||
import org.jetbrains.kotlin.psi.KtDelegatorByExpressionSpecifier
|
||||
import org.jetbrains.kotlin.psi.KtDelegatedSuperTypeEntry
|
||||
import org.jetbrains.kotlin.psi.KtTypeReference
|
||||
import org.jetbrains.kotlin.resolve.OverridingUtil.OverrideCompatibilityInfo.Result.OVERRIDABLE
|
||||
import org.jetbrains.kotlin.types.KotlinType
|
||||
@@ -37,8 +37,8 @@ class DelegationResolver<T : CallableMemberDescriptor> private constructor(
|
||||
|
||||
private fun generateDelegatedMembers(): Collection<T> {
|
||||
val delegatedMembers = hashSetOf<T>()
|
||||
for (delegationSpecifier in classOrObject.getDelegationSpecifiers()) {
|
||||
if (delegationSpecifier !is KtDelegatorByExpressionSpecifier) {
|
||||
for (delegationSpecifier in classOrObject.getSuperTypeListEntries()) {
|
||||
if (delegationSpecifier !is KtDelegatedSuperTypeEntry) {
|
||||
continue
|
||||
}
|
||||
val typeReference = delegationSpecifier.typeReference ?: continue
|
||||
|
||||
@@ -109,8 +109,8 @@ public class DescriptorResolver {
|
||||
BindingTrace trace
|
||||
) {
|
||||
List<KotlinType> supertypes = Lists.newArrayList();
|
||||
List<KtDelegationSpecifier> delegationSpecifiers = jetClass.getDelegationSpecifiers();
|
||||
Collection<KotlinType> declaredSupertypes = resolveDelegationSpecifiers(
|
||||
List<KtSuperTypeListEntry> delegationSpecifiers = jetClass.getSuperTypeListEntries();
|
||||
Collection<KotlinType> declaredSupertypes = resolveSuperTypeListEntries(
|
||||
scope,
|
||||
delegationSpecifiers,
|
||||
typeResolver, trace, false);
|
||||
@@ -166,9 +166,9 @@ public class DescriptorResolver {
|
||||
return builtIns.getAnyType();
|
||||
}
|
||||
|
||||
public Collection<KotlinType> resolveDelegationSpecifiers(
|
||||
public Collection<KotlinType> resolveSuperTypeListEntries(
|
||||
LexicalScope extensibleScope,
|
||||
List<KtDelegationSpecifier> delegationSpecifiers,
|
||||
List<KtSuperTypeListEntry> delegationSpecifiers,
|
||||
@NotNull TypeResolver resolver,
|
||||
BindingTrace trace,
|
||||
boolean checkBounds
|
||||
@@ -177,7 +177,7 @@ public class DescriptorResolver {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
Collection<KotlinType> result = Lists.newArrayList();
|
||||
for (KtDelegationSpecifier delegationSpecifier : delegationSpecifiers) {
|
||||
for (KtSuperTypeListEntry delegationSpecifier : delegationSpecifiers) {
|
||||
KtTypeReference typeReference = delegationSpecifier.getTypeReference();
|
||||
if (typeReference != null) {
|
||||
KotlinType supertype = resolver.resolveType(extensibleScope, typeReference, trace, checkBounds);
|
||||
|
||||
@@ -19,7 +19,6 @@ package org.jetbrains.kotlin.resolve
|
||||
import com.google.common.collect.HashMultimap
|
||||
import com.google.common.collect.Multimap
|
||||
import com.intellij.psi.PsiElement
|
||||
import com.intellij.psi.util.PsiTreeUtil
|
||||
import org.jetbrains.kotlin.descriptors.*
|
||||
import org.jetbrains.kotlin.diagnostics.Errors.*
|
||||
import org.jetbrains.kotlin.incremental.KotlinLookupLocation
|
||||
@@ -163,7 +162,7 @@ public class LazyTopDownAnalyzer(
|
||||
trace.report(UNSUPPORTED.on(typedef, "Typedefs are not supported"))
|
||||
}
|
||||
|
||||
override fun visitMultiDeclaration(multiDeclaration: KtMultiDeclaration) {
|
||||
override fun visitDestructuringDeclaration(destructuringDeclaration: KtDestructuringDeclaration) {
|
||||
// Ignore: multi-declarations are only allowed locally
|
||||
}
|
||||
|
||||
|
||||
@@ -192,10 +192,10 @@ public class ModifiersChecker {
|
||||
checkModifierListCommon(modifierListOwner, descriptor);
|
||||
}
|
||||
|
||||
public void checkModifiersForMultiDeclaration(@NotNull KtMultiDeclaration multiDeclaration) {
|
||||
public void checkModifiersForDestructuringDeclaration(@NotNull KtDestructuringDeclaration multiDeclaration) {
|
||||
annotationChecker.check(multiDeclaration, trace, null);
|
||||
ModifierCheckerCore.INSTANCE.check(multiDeclaration, trace, null);
|
||||
for (KtMultiDeclarationEntry multiEntry: multiDeclaration.getEntries()) {
|
||||
for (KtDestructuringDeclarationEntry multiEntry: multiDeclaration.getEntries()) {
|
||||
annotationChecker.check(multiEntry, trace, null);
|
||||
ModifierCheckerCore.INSTANCE.check(multiEntry, trace, null);
|
||||
UnderscoreChecker.INSTANCE.checkNamed(multiEntry, trace);
|
||||
|
||||
@@ -57,7 +57,7 @@ class VarianceChecker(private val trace: BindingTrace) {
|
||||
private fun checkClasses(c: TopDownAnalysisContext) {
|
||||
for (jetClassOrObject in c.getDeclaredClasses()!!.keySet()) {
|
||||
if (jetClassOrObject is KtClass) {
|
||||
for (specifier in jetClassOrObject.getDelegationSpecifiers()) {
|
||||
for (specifier in jetClassOrObject.getSuperTypeListEntries()) {
|
||||
specifier.getTypeReference()?.checkTypePosition(trace.getBindingContext(), OUT_VARIANCE, trace)
|
||||
}
|
||||
jetClassOrObject.checkTypeParameters(trace.getBindingContext(), OUT_VARIANCE, trace)
|
||||
|
||||
@@ -30,22 +30,15 @@ import org.jetbrains.kotlin.resolve.TemporaryBindingTrace;
|
||||
import org.jetbrains.kotlin.resolve.TypeResolver;
|
||||
import org.jetbrains.kotlin.resolve.callableReferences.CallableReferencesResolutionUtilsKt;
|
||||
import org.jetbrains.kotlin.resolve.calls.callResolverUtil.ResolveArgumentsMode;
|
||||
import org.jetbrains.kotlin.resolve.calls.callUtil.CallUtilKt;
|
||||
import org.jetbrains.kotlin.resolve.calls.context.CallResolutionContext;
|
||||
import org.jetbrains.kotlin.resolve.calls.context.CheckArgumentTypesMode;
|
||||
import org.jetbrains.kotlin.resolve.calls.context.ResolutionContext;
|
||||
import org.jetbrains.kotlin.resolve.calls.inference.ConstraintSystemBuilderImplKt;
|
||||
import org.jetbrains.kotlin.resolve.calls.model.MutableDataFlowInfoForArguments;
|
||||
import org.jetbrains.kotlin.resolve.calls.results.OverloadResolutionResults;
|
||||
import org.jetbrains.kotlin.resolve.calls.smartcasts.DataFlowInfo;
|
||||
import org.jetbrains.kotlin.resolve.calls.smartcasts.DataFlowValue;
|
||||
import org.jetbrains.kotlin.resolve.calls.smartcasts.DataFlowValueFactory;
|
||||
import org.jetbrains.kotlin.resolve.constants.IntegerValueTypeConstructor;
|
||||
import org.jetbrains.kotlin.resolve.constants.evaluate.ConstantExpressionEvaluator;
|
||||
import org.jetbrains.kotlin.resolve.scopes.LexicalScope;
|
||||
import org.jetbrains.kotlin.resolve.scopes.receivers.QualifierReceiver;
|
||||
import org.jetbrains.kotlin.resolve.scopes.receivers.Receiver;
|
||||
import org.jetbrains.kotlin.resolve.scopes.receivers.ReceiverValue;
|
||||
import org.jetbrains.kotlin.types.FunctionPlaceholders;
|
||||
import org.jetbrains.kotlin.types.FunctionPlaceholdersKt;
|
||||
import org.jetbrains.kotlin.types.KotlinType;
|
||||
@@ -117,7 +110,7 @@ public class ArgumentTypeResolver {
|
||||
|
||||
for (ValueArgument valueArgument : context.call.getValueArguments()) {
|
||||
KtExpression argumentExpression = valueArgument.getArgumentExpression();
|
||||
if (argumentExpression != null && !(argumentExpression instanceof KtFunctionLiteralExpression)) {
|
||||
if (argumentExpression != null && !(argumentExpression instanceof KtLambdaExpression)) {
|
||||
checkArgumentTypeWithNoCallee(context, argumentExpression);
|
||||
}
|
||||
}
|
||||
@@ -173,8 +166,8 @@ public class ArgumentTypeResolver {
|
||||
@NotNull KtExpression expression, @NotNull ResolutionContext context
|
||||
) {
|
||||
KtExpression deparenthesizedExpression = getLastElementDeparenthesized(expression, context.statementFilter);
|
||||
if (deparenthesizedExpression instanceof KtFunctionLiteralExpression) {
|
||||
return ((KtFunctionLiteralExpression) deparenthesizedExpression).getFunctionLiteral();
|
||||
if (deparenthesizedExpression instanceof KtLambdaExpression) {
|
||||
return ((KtLambdaExpression) deparenthesizedExpression).getFunctionLiteral();
|
||||
}
|
||||
if (deparenthesizedExpression instanceof KtFunction) {
|
||||
return (KtFunction) deparenthesizedExpression;
|
||||
|
||||
+1
-2
@@ -24,7 +24,6 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltIns;
|
||||
import org.jetbrains.kotlin.descriptors.*;
|
||||
import org.jetbrains.kotlin.lexer.KtTokens;
|
||||
import org.jetbrains.kotlin.psi.*;
|
||||
import org.jetbrains.kotlin.resolve.*;
|
||||
import org.jetbrains.kotlin.resolve.bindingContextUtil.BindingContextUtilsKt;
|
||||
@@ -222,7 +221,7 @@ public class CallExpressionResolver {
|
||||
if (result[0]) {
|
||||
FunctionDescriptor functionDescriptor = resolvedCall != null ? resolvedCall.getResultingDescriptor() : null;
|
||||
temporaryForFunction.commit();
|
||||
if (callExpression.getValueArgumentList() == null && callExpression.getFunctionLiteralArguments().isEmpty()) {
|
||||
if (callExpression.getValueArgumentList() == null && callExpression.getLambdaArguments().isEmpty()) {
|
||||
// there are only type arguments
|
||||
boolean hasValueParameters = functionDescriptor == null || functionDescriptor.getValueParameters().size() > 0;
|
||||
context.trace.report(FUNCTION_CALL_EXPECTED.on(callExpression, callExpression, hasValueParameters));
|
||||
|
||||
@@ -330,8 +330,8 @@ public class CallResolver {
|
||||
|
||||
// Here we handle the case where the callee expression must be something of type function, e.g. (foo.bar())(1, 2)
|
||||
KotlinType expectedType = NO_EXPECTED_TYPE;
|
||||
if (calleeExpression instanceof KtFunctionLiteralExpression) {
|
||||
int parameterNumber = ((KtFunctionLiteralExpression) calleeExpression).getValueParameters().size();
|
||||
if (calleeExpression instanceof KtLambdaExpression) {
|
||||
int parameterNumber = ((KtLambdaExpression) calleeExpression).getValueParameters().size();
|
||||
List<KotlinType> parameterTypes = new ArrayList<KotlinType>(parameterNumber);
|
||||
for (int i = 0; i < parameterNumber; i++) {
|
||||
parameterTypes.add(NO_EXPECTED_TYPE);
|
||||
|
||||
@@ -117,7 +117,7 @@ public fun isOrOverridesSynthesized(descriptor: CallableMemberDescriptor): Boole
|
||||
fun isConventionCall(call: Call): Boolean {
|
||||
if (call is CallTransformer.CallForImplicitInvoke) return true
|
||||
val callElement = call.callElement
|
||||
if (callElement is KtArrayAccessExpression || callElement is KtMultiDeclarationEntry) return true
|
||||
if (callElement is KtArrayAccessExpression || callElement is KtDestructuringDeclarationEntry) return true
|
||||
val calleeExpression = call.calleeExpression as? KtOperationReferenceExpression ?: return false
|
||||
return calleeExpression.getNameForConventionalOperation() != null
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ public class CallTransformer<D extends CallableDescriptor, F extends D> {
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public List<FunctionLiteralArgument> getFunctionLiteralArguments() {
|
||||
public List<LambdaArgument> getFunctionLiteralArguments() {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -256,10 +256,10 @@ public class ValueArgumentsToParametersMapper {
|
||||
D candidate = candidateCall.getCandidateDescriptor();
|
||||
List<ValueParameterDescriptor> valueParameters = candidate.getValueParameters();
|
||||
|
||||
List<? extends FunctionLiteralArgument> functionLiteralArguments = call.getFunctionLiteralArguments();
|
||||
List<? extends LambdaArgument> functionLiteralArguments = call.getFunctionLiteralArguments();
|
||||
if (!functionLiteralArguments.isEmpty()) {
|
||||
FunctionLiteralArgument functionLiteralArgument = functionLiteralArguments.get(0);
|
||||
KtExpression possiblyLabeledFunctionLiteral = functionLiteralArgument.getArgumentExpression();
|
||||
LambdaArgument lambdaArgument = functionLiteralArguments.get(0);
|
||||
KtExpression possiblyLabeledFunctionLiteral = lambdaArgument.getArgumentExpression();
|
||||
|
||||
if (valueParameters.isEmpty()) {
|
||||
report(TOO_MANY_ARGUMENTS.on(possiblyLabeledFunctionLiteral, candidate));
|
||||
@@ -277,7 +277,7 @@ public class ValueArgumentsToParametersMapper {
|
||||
setStatus(WEAK_ERROR);
|
||||
}
|
||||
else {
|
||||
putVararg(valueParameterDescriptor, functionLiteralArgument);
|
||||
putVararg(valueParameterDescriptor, lambdaArgument);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ import org.jetbrains.kotlin.diagnostics.Errors.UNRESOLVED_REFERENCE
|
||||
import org.jetbrains.kotlin.diagnostics.Errors.UNRESOLVED_REFERENCE_WRONG_RECEIVER
|
||||
import org.jetbrains.kotlin.psi.Call
|
||||
import org.jetbrains.kotlin.psi.KtConstructorDelegationCall
|
||||
import org.jetbrains.kotlin.psi.KtFunctionLiteralArgument
|
||||
import org.jetbrains.kotlin.psi.KtLambdaArgument
|
||||
import org.jetbrains.kotlin.psi.KtSecondaryConstructor
|
||||
import org.jetbrains.kotlin.resolve.BindingContext.CALL
|
||||
import org.jetbrains.kotlin.resolve.BindingContext.REFERENCE_TARGET
|
||||
|
||||
@@ -172,7 +172,7 @@ class DynamicCallableDescriptors(private val builtIns: KotlinBuiltIns) {
|
||||
))
|
||||
}
|
||||
|
||||
fun getFunctionType(funLiteralExpr: KtFunctionLiteralExpression): KotlinType {
|
||||
fun getFunctionType(funLiteralExpr: KtLambdaExpression): KotlinType {
|
||||
val funLiteral = funLiteralExpr.getFunctionLiteral()
|
||||
|
||||
val receiverType = funLiteral.getReceiverTypeReference()?.let { dynamicType }
|
||||
@@ -189,7 +189,7 @@ class DynamicCallableDescriptors(private val builtIns: KotlinBuiltIns) {
|
||||
val argExpression = KtPsiUtil.deparenthesize(arg.getArgumentExpression())
|
||||
|
||||
when {
|
||||
argExpression is KtFunctionLiteralExpression -> {
|
||||
argExpression is KtLambdaExpression -> {
|
||||
outType = getFunctionType(argExpression)
|
||||
varargElementType = null
|
||||
}
|
||||
@@ -210,7 +210,7 @@ class DynamicCallableDescriptors(private val builtIns: KotlinBuiltIns) {
|
||||
|
||||
if (hasSpreadOperator) {
|
||||
for (funLiteralArg in call.getFunctionLiteralArguments()) {
|
||||
addParameter(funLiteralArg, getFunctionType(funLiteralArg.getFunctionLiteral()), null)
|
||||
addParameter(funLiteralArg, getFunctionType(funLiteralArg.getLambdaExpression()), null)
|
||||
}
|
||||
|
||||
break
|
||||
|
||||
@@ -164,7 +164,7 @@ public class CallMaker {
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public List<FunctionLiteralArgument> getFunctionLiteralArguments() {
|
||||
public List<LambdaArgument> getFunctionLiteralArguments() {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
@NotNull
|
||||
@@ -304,8 +304,8 @@ public class CallMaker {
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public List<? extends FunctionLiteralArgument> getFunctionLiteralArguments() {
|
||||
return callElement.getFunctionLiteralArguments();
|
||||
public List<? extends LambdaArgument> getFunctionLiteralArguments() {
|
||||
return callElement.getLambdaArguments();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -73,7 +73,7 @@ public class DelegatingCall implements Call {
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public List<? extends FunctionLiteralArgument> getFunctionLiteralArguments() {
|
||||
public List<? extends LambdaArgument> getFunctionLiteralArguments() {
|
||||
return delegate.getFunctionLiteralArguments();
|
||||
}
|
||||
|
||||
|
||||
@@ -87,14 +87,14 @@ public fun KtCallElement.getValueArgumentsInParentheses(): List<ValueArgument> =
|
||||
public fun Call.getValueArgumentListOrElement(): KtElement = getValueArgumentList() ?: getCalleeExpression() ?: getCallElement()
|
||||
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
private fun List<ValueArgument?>.filterArgsInParentheses() = filter { it !is KtFunctionLiteralArgument } as List<ValueArgument>
|
||||
private fun List<ValueArgument?>.filterArgsInParentheses() = filter { it !is KtLambdaArgument } as List<ValueArgument>
|
||||
|
||||
public fun Call.getValueArgumentForExpression(expression: KtExpression): ValueArgument? {
|
||||
fun KtElement.deparenthesizeStructurally(): KtElement? {
|
||||
val deparenthesized = if (this is KtExpression) KtPsiUtil.deparenthesizeOnce(this) else this
|
||||
return when {
|
||||
deparenthesized != this -> deparenthesized
|
||||
this is KtFunctionLiteralExpression -> this.getFunctionLiteral()
|
||||
this is KtLambdaExpression -> this.getFunctionLiteral()
|
||||
this is KtFunctionLiteral -> this.getBodyExpression()
|
||||
else -> null
|
||||
}
|
||||
|
||||
+1
-1
@@ -54,7 +54,7 @@ public abstract class AbstractPsiBasedDeclarationProvider(storageManager: Storag
|
||||
val scriptInfo = JetScriptInfo(declaration)
|
||||
classesAndObjects.put(scriptInfo.script.nameAsName, scriptInfo)
|
||||
}
|
||||
else if (declaration is KtParameter || declaration is KtTypedef || declaration is KtMultiDeclaration) {
|
||||
else if (declaration is KtParameter || declaration is KtTypedef || declaration is KtDestructuringDeclaration) {
|
||||
// Do nothing, just put it into allDeclarations is enough
|
||||
}
|
||||
else {
|
||||
|
||||
+1
-1
@@ -159,7 +159,7 @@ protected constructor(
|
||||
result.addAll(classDescriptors(name))
|
||||
}
|
||||
}
|
||||
else if (declaration is KtTypedef || declaration is KtMultiDeclaration) {
|
||||
else if (declaration is KtTypedef || declaration is KtDestructuringDeclaration) {
|
||||
// Do nothing for typedefs as they are not supported.
|
||||
// MultiDeclarations are not supported on global level too.
|
||||
}
|
||||
|
||||
+1
-1
@@ -641,7 +641,7 @@ public class LazyClassDescriptor extends ClassDescriptorBase implements ClassDes
|
||||
PsiElement elementToMark = null;
|
||||
if (psiElement instanceof KtClassOrObject) {
|
||||
KtClassOrObject classOrObject = (KtClassOrObject) psiElement;
|
||||
for (KtDelegationSpecifier delegationSpecifier : classOrObject.getDelegationSpecifiers()) {
|
||||
for (KtSuperTypeListEntry delegationSpecifier : classOrObject.getSuperTypeListEntries()) {
|
||||
KtTypeReference typeReference = delegationSpecifier.getTypeReference();
|
||||
if (typeReference == null) continue;
|
||||
KotlinType supertype = trace.get(TYPE, typeReference);
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ public class DeprecatedSymbolValidator : SymbolUsageValidator {
|
||||
return
|
||||
|
||||
// Do not check types in calls to super constructor in extends list, rely on call message
|
||||
val superExpression = KtStubbedPsiUtil.getPsiOrStubParent(element, javaClass<KtDelegatorToSuperCall>(), true)
|
||||
val superExpression = KtStubbedPsiUtil.getPsiOrStubParent(element, javaClass<KtSuperTypeCallEntry>(), true)
|
||||
if (superExpression != null && superExpression.getCalleeExpression().getConstructorReferenceExpression() == element)
|
||||
return
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ public class OperatorValidator : SymbolUsageValidator {
|
||||
}
|
||||
|
||||
fun isMultiDeclaration(): Boolean {
|
||||
return (resolvedCall != null) && (call?.callElement is KtMultiDeclarationEntry)
|
||||
return (resolvedCall != null) && (call?.callElement is KtDestructuringDeclarationEntry)
|
||||
}
|
||||
|
||||
fun isConventionOperator(): Boolean {
|
||||
|
||||
+3
-3
@@ -46,10 +46,10 @@ abstract class AssignedVariablesSearcher: KtTreeVisitorVoid() {
|
||||
currentDeclaration = previous
|
||||
}
|
||||
|
||||
override fun visitFunctionLiteralExpression(functionLiteralExpression: KtFunctionLiteralExpression) {
|
||||
override fun visitLambdaExpression(lambdaExpression: KtLambdaExpression) {
|
||||
val previous = currentDeclaration
|
||||
currentDeclaration = functionLiteralExpression.functionLiteral
|
||||
super.visitFunctionLiteralExpression(functionLiteralExpression)
|
||||
currentDeclaration = lambdaExpression.functionLiteral
|
||||
super.visitLambdaExpression(lambdaExpression)
|
||||
currentDeclaration = previous
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -743,9 +743,9 @@ public class BasicExpressionTypingVisitor extends ExpressionTypingVisitor {
|
||||
expression.getObjectDeclaration());
|
||||
temporaryTrace.commit();
|
||||
DataFlowInfo resultFlowInfo = context.dataFlowInfo;
|
||||
for (KtDelegationSpecifier specifier : expression.getObjectDeclaration().getDelegationSpecifiers()) {
|
||||
if (specifier instanceof KtDelegatorToSuperCall) {
|
||||
KtDelegatorToSuperCall delegator = (KtDelegatorToSuperCall) specifier;
|
||||
for (KtSuperTypeListEntry specifier : expression.getObjectDeclaration().getSuperTypeListEntries()) {
|
||||
if (specifier instanceof KtSuperTypeCallEntry) {
|
||||
KtSuperTypeCallEntry delegator = (KtSuperTypeCallEntry) specifier;
|
||||
KotlinTypeInfo delegatorTypeInfo = context.trace.get(EXPRESSION_TYPE_INFO, delegator.getCalleeExpression());
|
||||
if (delegatorTypeInfo != null) {
|
||||
resultFlowInfo = resultFlowInfo.and(delegatorTypeInfo.getDataFlowInfo());
|
||||
|
||||
+1
-1
@@ -246,7 +246,7 @@ public class ControlStructureTypingUtils {
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public List<FunctionLiteralArgument> getFunctionLiteralArguments() {
|
||||
public List<LambdaArgument> getFunctionLiteralArguments() {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
|
||||
+5
-5
@@ -313,7 +313,7 @@ public class ControlStructureTypingVisitor extends ExpressionTypingVisitor {
|
||||
// .and it with entrance data flow information, because do-while body is executed at least once
|
||||
// See KT-6283
|
||||
KotlinTypeInfo bodyTypeInfo;
|
||||
if (body instanceof KtFunctionLiteralExpression) {
|
||||
if (body instanceof KtLambdaExpression) {
|
||||
// As a matter of fact, function literal is always unused at this point
|
||||
bodyTypeInfo = facade.getTypeInfo(body, context.replaceScope(context.scope));
|
||||
}
|
||||
@@ -397,15 +397,15 @@ public class ControlStructureTypingVisitor extends ExpressionTypingVisitor {
|
||||
loopScope.addVariableDescriptor(variableDescriptor);
|
||||
}
|
||||
else {
|
||||
KtMultiDeclaration multiParameter = expression.getMultiParameter();
|
||||
KtDestructuringDeclaration multiParameter = expression.getDestructuringParameter();
|
||||
if (multiParameter != null && loopRange != null) {
|
||||
KotlinType elementType = expectedParameterType == null ? ErrorUtils.createErrorType("Loop range has no type") : expectedParameterType;
|
||||
TransientReceiver iteratorNextAsReceiver = new TransientReceiver(elementType);
|
||||
components.annotationResolver.resolveAnnotationsWithArguments(loopScope, multiParameter.getModifierList(), context.trace);
|
||||
components.multiDeclarationResolver.defineLocalVariablesFromMultiDeclaration(
|
||||
components.destructuringDeclarationResolver.defineLocalVariablesFromMultiDeclaration(
|
||||
loopScope, multiParameter, iteratorNextAsReceiver, loopRange, context
|
||||
);
|
||||
components.modifiersChecker.withTrace(context.trace).checkModifiersForMultiDeclaration(multiParameter);
|
||||
components.modifiersChecker.withTrace(context.trace).checkModifiersForDestructuringDeclaration(multiParameter);
|
||||
components.modifiersChecker.withTrace(context.trace).checkParameterHasNoValOrVar(multiParameter, VAL_OR_VAR_ON_LOOP_MULTI_PARAMETER);
|
||||
components.identifierChecker.checkDeclaration(multiParameter, context.trace);
|
||||
}
|
||||
@@ -538,7 +538,7 @@ public class ControlStructureTypingVisitor extends ExpressionTypingVisitor {
|
||||
}
|
||||
|
||||
if (expression.getTargetLabel() == null) {
|
||||
while (parentDeclaration instanceof KtMultiDeclaration) {
|
||||
while (parentDeclaration instanceof KtDestructuringDeclaration) {
|
||||
//TODO: It's hacking fix for KT-5100: Strange "Return is not allowed here" for multi-declaration initializer with elvis expression
|
||||
parentDeclaration = PsiTreeUtil.getParentOfType(parentDeclaration, KtDeclaration.class);
|
||||
}
|
||||
|
||||
+6
-6
@@ -17,9 +17,9 @@
|
||||
package org.jetbrains.kotlin.types.expressions
|
||||
|
||||
import org.jetbrains.kotlin.diagnostics.Errors
|
||||
import org.jetbrains.kotlin.psi.KtDestructuringDeclaration
|
||||
import org.jetbrains.kotlin.psi.KtDestructuringDeclarationEntry
|
||||
import org.jetbrains.kotlin.psi.KtExpression
|
||||
import org.jetbrains.kotlin.psi.KtMultiDeclaration
|
||||
import org.jetbrains.kotlin.psi.KtMultiDeclarationEntry
|
||||
import org.jetbrains.kotlin.resolve.BindingContext
|
||||
import org.jetbrains.kotlin.resolve.DescriptorResolver
|
||||
import org.jetbrains.kotlin.resolve.TypeResolver
|
||||
@@ -32,7 +32,7 @@ import org.jetbrains.kotlin.types.KotlinType
|
||||
import org.jetbrains.kotlin.types.TypeUtils
|
||||
import org.jetbrains.kotlin.types.checker.KotlinTypeChecker
|
||||
|
||||
public class MultiDeclarationResolver(
|
||||
public class DestructuringDeclarationResolver(
|
||||
private val fakeCallResolver: FakeCallResolver,
|
||||
private val descriptorResolver: DescriptorResolver,
|
||||
private val typeResolver: TypeResolver,
|
||||
@@ -40,12 +40,12 @@ public class MultiDeclarationResolver(
|
||||
) {
|
||||
public fun defineLocalVariablesFromMultiDeclaration(
|
||||
writableScope: LexicalWritableScope,
|
||||
multiDeclaration: KtMultiDeclaration,
|
||||
destructuringDeclaration: KtDestructuringDeclaration,
|
||||
receiver: ReceiverValue,
|
||||
reportErrorsOn: KtExpression,
|
||||
context: ExpressionTypingContext
|
||||
) {
|
||||
for ((componentIndex, entry) in multiDeclaration.getEntries().withIndex()) {
|
||||
for ((componentIndex, entry) in destructuringDeclaration.getEntries().withIndex()) {
|
||||
val componentName = createComponentName(componentIndex + 1)
|
||||
|
||||
val expectedType = getExpectedTypeForComponent(context, entry)
|
||||
@@ -80,7 +80,7 @@ public class MultiDeclarationResolver(
|
||||
}
|
||||
}
|
||||
|
||||
private fun getExpectedTypeForComponent(context: ExpressionTypingContext, entry: KtMultiDeclarationEntry): KotlinType {
|
||||
private fun getExpectedTypeForComponent(context: ExpressionTypingContext, entry: KtDestructuringDeclarationEntry): KotlinType {
|
||||
val entryTypeRef = entry.getTypeReference() ?: return TypeUtils.NO_EXPECTED_TYPE
|
||||
return typeResolver.resolveType(context.scope, entryTypeRef, context.trace, true)
|
||||
}
|
||||
+3
-3
@@ -49,7 +49,7 @@ public class ExpressionTypingComponents {
|
||||
/*package*/ TypeResolver typeResolver;
|
||||
/*package*/ AnnotationResolver annotationResolver;
|
||||
/*package*/ ValueParameterResolver valueParameterResolver;
|
||||
/*package*/ MultiDeclarationResolver multiDeclarationResolver;
|
||||
/*package*/ DestructuringDeclarationResolver destructuringDeclarationResolver;
|
||||
/*package*/ ConstantExpressionEvaluator constantExpressionEvaluator;
|
||||
/*package*/ ModifiersChecker modifiersChecker;
|
||||
/*package*/ DataFlowAnalyzer dataFlowAnalyzer;
|
||||
@@ -142,8 +142,8 @@ public class ExpressionTypingComponents {
|
||||
}
|
||||
|
||||
@Inject
|
||||
public void setMultiDeclarationResolver(MultiDeclarationResolver multiDeclarationResolver) {
|
||||
this.multiDeclarationResolver = multiDeclarationResolver;
|
||||
public void setDestructuringDeclarationResolver(DestructuringDeclarationResolver destructuringDeclarationResolver) {
|
||||
this.destructuringDeclarationResolver = destructuringDeclarationResolver;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
+2
-2
@@ -229,8 +229,8 @@ public abstract class ExpressionTypingVisitorDispatcher extends KtVisitor<Kotlin
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@Override
|
||||
public KotlinTypeInfo visitFunctionLiteralExpression(@NotNull KtFunctionLiteralExpression expression, ExpressionTypingContext data) {
|
||||
return functions.visitFunctionLiteralExpression(expression, data);
|
||||
public KotlinTypeInfo visitLambdaExpression(@NotNull KtLambdaExpression expression, ExpressionTypingContext data) {
|
||||
return functions.visitLambdaExpression(expression, data);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+4
-3
@@ -163,7 +163,7 @@ public class ExpressionTypingVisitorForStatements extends ExpressionTypingVisito
|
||||
}
|
||||
|
||||
@Override
|
||||
public KotlinTypeInfo visitMultiDeclaration(@NotNull KtMultiDeclaration multiDeclaration, ExpressionTypingContext context) {
|
||||
public KotlinTypeInfo visitDestructuringDeclaration(@NotNull KtDestructuringDeclaration multiDeclaration, ExpressionTypingContext context) {
|
||||
components.annotationResolver.resolveAnnotationsWithArguments(scope, multiDeclaration.getModifierList(), context.trace);
|
||||
|
||||
KtExpression initializer = multiDeclaration.getInitializer();
|
||||
@@ -177,8 +177,9 @@ public class ExpressionTypingVisitorForStatements extends ExpressionTypingVisito
|
||||
if (expressionReceiver == null) {
|
||||
return TypeInfoFactoryKt.noTypeInfo(context);
|
||||
}
|
||||
components.multiDeclarationResolver.defineLocalVariablesFromMultiDeclaration(scope, multiDeclaration, expressionReceiver, initializer, context);
|
||||
components.modifiersChecker.withTrace(context.trace).checkModifiersForMultiDeclaration(multiDeclaration);
|
||||
components.destructuringDeclarationResolver
|
||||
.defineLocalVariablesFromMultiDeclaration(scope, multiDeclaration, expressionReceiver, initializer, context);
|
||||
components.modifiersChecker.withTrace(context.trace).checkModifiersForDestructuringDeclaration(multiDeclaration);
|
||||
components.identifierChecker.checkDeclaration(multiDeclaration, context.trace);
|
||||
return typeInfo.replaceType(components.dataFlowAnalyzer.checkStatementType(multiDeclaration, context));
|
||||
}
|
||||
|
||||
+4
-4
@@ -130,7 +130,7 @@ internal class FunctionsTypingVisitor(facade: ExpressionTypingInternals) : Expre
|
||||
return components.builtIns.getFunctionType(Annotations.EMPTY, receiverType, parameters, returnType)
|
||||
}
|
||||
|
||||
override fun visitFunctionLiteralExpression(expression: KtFunctionLiteralExpression, context: ExpressionTypingContext): KotlinTypeInfo? {
|
||||
override fun visitLambdaExpression(expression: KtLambdaExpression, context: ExpressionTypingContext): KotlinTypeInfo? {
|
||||
if (!expression.getFunctionLiteral().hasBody()) return null
|
||||
|
||||
val expectedType = context.expectedType
|
||||
@@ -154,7 +154,7 @@ internal class FunctionsTypingVisitor(facade: ExpressionTypingInternals) : Expre
|
||||
}
|
||||
|
||||
private fun createFunctionLiteralDescriptor(
|
||||
expression: KtFunctionLiteralExpression,
|
||||
expression: KtLambdaExpression,
|
||||
context: ExpressionTypingContext
|
||||
): AnonymousFunctionDescriptor {
|
||||
val functionLiteral = expression.getFunctionLiteral()
|
||||
@@ -174,7 +174,7 @@ internal class FunctionsTypingVisitor(facade: ExpressionTypingInternals) : Expre
|
||||
}
|
||||
|
||||
private fun computeReturnType(
|
||||
expression: KtFunctionLiteralExpression,
|
||||
expression: KtLambdaExpression,
|
||||
context: ExpressionTypingContext,
|
||||
functionDescriptor: SimpleFunctionDescriptorImpl,
|
||||
functionTypeExpected: Boolean
|
||||
@@ -191,7 +191,7 @@ internal class FunctionsTypingVisitor(facade: ExpressionTypingInternals) : Expre
|
||||
}
|
||||
|
||||
private fun computeUnsafeReturnType(
|
||||
expression: KtFunctionLiteralExpression,
|
||||
expression: KtLambdaExpression,
|
||||
context: ExpressionTypingContext,
|
||||
functionDescriptor: SimpleFunctionDescriptorImpl,
|
||||
expectedReturnType: KotlinType?
|
||||
|
||||
@@ -65,7 +65,7 @@ public class LabelResolver {
|
||||
return getLabelNameIfAny(element.getParent());
|
||||
}
|
||||
|
||||
if (element instanceof KtFunctionLiteralExpression) {
|
||||
if (element instanceof KtLambdaExpression) {
|
||||
return getLabelForFunctionalExpression((KtExpression) element);
|
||||
}
|
||||
|
||||
@@ -88,8 +88,8 @@ public class LabelResolver {
|
||||
@NotNull
|
||||
private KtExpression getExpressionUnderLabel(@NotNull KtExpression labeledExpression) {
|
||||
KtExpression expression = KtPsiUtil.safeDeparenthesize(labeledExpression);
|
||||
if (expression instanceof KtFunctionLiteralExpression) {
|
||||
return ((KtFunctionLiteralExpression) expression).getFunctionLiteral();
|
||||
if (expression instanceof KtLambdaExpression) {
|
||||
return ((KtLambdaExpression) expression).getFunctionLiteral();
|
||||
}
|
||||
return expression;
|
||||
}
|
||||
@@ -111,7 +111,7 @@ public class LabelResolver {
|
||||
@Nullable
|
||||
private KtCallExpression getContainingCallExpression(@NotNull KtExpression expression) {
|
||||
PsiElement parent = expression.getParent();
|
||||
if (parent instanceof KtFunctionLiteralArgument) {
|
||||
if (parent instanceof KtLambdaArgument) {
|
||||
// f {}
|
||||
PsiElement call = parent.getParent();
|
||||
if (call instanceof KtCallExpression) {
|
||||
|
||||
Vendored
+4
-4
@@ -40,8 +40,8 @@ JetFile: BabySteps.kt
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
DELEGATION_SPECIFIER_LIST
|
||||
DELEGATOR_SUPER_CALL
|
||||
SUPER_TYPE_LIST
|
||||
SUPER_TYPE_CALL_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
@@ -59,7 +59,7 @@ JetFile: BabySteps.kt
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
DELEGATOR_BY
|
||||
DELEGATED_SUPER_TYPE_ENTRY
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
@@ -71,7 +71,7 @@ JetFile: BabySteps.kt
|
||||
PsiElement(IDENTIFIER)('x')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
DELEGATOR_SUPER_CLASS
|
||||
SUPER_TYPE_ENTRY
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
|
||||
+4
-4
@@ -40,8 +40,8 @@ JetFile: BabySteps_ERR.kt
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
DELEGATION_SPECIFIER_LIST
|
||||
DELEGATOR_SUPER_CALL
|
||||
SUPER_TYPE_LIST
|
||||
SUPER_TYPE_CALL_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
@@ -61,7 +61,7 @@ JetFile: BabySteps_ERR.kt
|
||||
PsiWhiteSpace(' ')
|
||||
PsiErrorElement:Expecting a delegation specifier
|
||||
PsiElement(COMMA)(',')
|
||||
DELEGATOR_BY
|
||||
DELEGATED_SUPER_TYPE_ENTRY
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
@@ -73,7 +73,7 @@ JetFile: BabySteps_ERR.kt
|
||||
PsiElement(IDENTIFIER)('x')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
DELEGATOR_SUPER_CLASS
|
||||
SUPER_TYPE_ENTRY
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
|
||||
Vendored
+22
-22
@@ -10,8 +10,8 @@ JetFile: ByClauses.kt
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
DELEGATION_SPECIFIER_LIST
|
||||
DELEGATOR_BY
|
||||
SUPER_TYPE_LIST
|
||||
DELEGATED_SUPER_TYPE_ENTRY
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
@@ -44,8 +44,8 @@ JetFile: ByClauses.kt
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
DELEGATION_SPECIFIER_LIST
|
||||
DELEGATOR_BY
|
||||
SUPER_TYPE_LIST
|
||||
DELEGATED_SUPER_TYPE_ENTRY
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
@@ -96,8 +96,8 @@ JetFile: ByClauses.kt
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
DELEGATION_SPECIFIER_LIST
|
||||
DELEGATOR_BY
|
||||
SUPER_TYPE_LIST
|
||||
DELEGATED_SUPER_TYPE_ENTRY
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
@@ -133,8 +133,8 @@ JetFile: ByClauses.kt
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
DELEGATION_SPECIFIER_LIST
|
||||
DELEGATOR_BY
|
||||
SUPER_TYPE_LIST
|
||||
DELEGATED_SUPER_TYPE_ENTRY
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
@@ -148,8 +148,8 @@ JetFile: ByClauses.kt
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiWhiteSpace(' ')
|
||||
FUNCTION_LITERAL_ARGUMENT
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_ARGUMENT
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
@@ -179,8 +179,8 @@ JetFile: ByClauses.kt
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
DELEGATION_SPECIFIER_LIST
|
||||
DELEGATOR_BY
|
||||
SUPER_TYPE_LIST
|
||||
DELEGATED_SUPER_TYPE_ENTRY
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
@@ -197,8 +197,8 @@ JetFile: ByClauses.kt
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiWhiteSpace(' ')
|
||||
FUNCTION_LITERAL_ARGUMENT
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_ARGUMENT
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
@@ -228,8 +228,8 @@ JetFile: ByClauses.kt
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
DELEGATION_SPECIFIER_LIST
|
||||
DELEGATOR_BY
|
||||
SUPER_TYPE_LIST
|
||||
DELEGATED_SUPER_TYPE_ENTRY
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
@@ -247,8 +247,8 @@ JetFile: ByClauses.kt
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiWhiteSpace(' ')
|
||||
FUNCTION_LITERAL_ARGUMENT
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_ARGUMENT
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
@@ -278,8 +278,8 @@ JetFile: ByClauses.kt
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
DELEGATION_SPECIFIER_LIST
|
||||
DELEGATOR_BY
|
||||
SUPER_TYPE_LIST
|
||||
DELEGATED_SUPER_TYPE_ENTRY
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
@@ -308,8 +308,8 @@ JetFile: ByClauses.kt
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiWhiteSpace(' ')
|
||||
FUNCTION_LITERAL_ARGUMENT
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_ARGUMENT
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
|
||||
+34
-34
@@ -17,24 +17,24 @@ JetFile: CallWithManyClosures.kt
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
FUNCTION_LITERAL_ARGUMENT
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_ARGUMENT
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
<empty list>
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace(' ')
|
||||
FUNCTION_LITERAL_ARGUMENT
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_ARGUMENT
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
<empty list>
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace(' ')
|
||||
FUNCTION_LITERAL_ARGUMENT
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_ARGUMENT
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
@@ -52,24 +52,24 @@ JetFile: CallWithManyClosures.kt
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiWhiteSpace(' ')
|
||||
FUNCTION_LITERAL_ARGUMENT
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_ARGUMENT
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
<empty list>
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace(' ')
|
||||
FUNCTION_LITERAL_ARGUMENT
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_ARGUMENT
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
<empty list>
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace(' ')
|
||||
FUNCTION_LITERAL_ARGUMENT
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_ARGUMENT
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
@@ -87,8 +87,8 @@ JetFile: CallWithManyClosures.kt
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiWhiteSpace(' ')
|
||||
FUNCTION_LITERAL_ARGUMENT
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_ARGUMENT
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
@@ -109,8 +109,8 @@ JetFile: CallWithManyClosures.kt
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
FUNCTION_LITERAL_ARGUMENT
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_ARGUMENT
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
@@ -131,24 +131,24 @@ JetFile: CallWithManyClosures.kt
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
FUNCTION_LITERAL_ARGUMENT
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_ARGUMENT
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
<empty list>
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace(' ')
|
||||
FUNCTION_LITERAL_ARGUMENT
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_ARGUMENT
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
<empty list>
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace(' ')
|
||||
FUNCTION_LITERAL_ARGUMENT
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_ARGUMENT
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
@@ -172,24 +172,24 @@ JetFile: CallWithManyClosures.kt
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
FUNCTION_LITERAL_ARGUMENT
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_ARGUMENT
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
<empty list>
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace(' ')
|
||||
FUNCTION_LITERAL_ARGUMENT
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_ARGUMENT
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
<empty list>
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace(' ')
|
||||
FUNCTION_LITERAL_ARGUMENT
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_ARGUMENT
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
@@ -221,24 +221,24 @@ JetFile: CallWithManyClosures.kt
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
FUNCTION_LITERAL_ARGUMENT
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_ARGUMENT
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
<empty list>
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace(' ')
|
||||
FUNCTION_LITERAL_ARGUMENT
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_ARGUMENT
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
<empty list>
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace(' ')
|
||||
FUNCTION_LITERAL_ARGUMENT
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_ARGUMENT
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
|
||||
+3
-3
@@ -148,7 +148,7 @@ JetFile: CallsInWhen.kt
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(DOT)('.')
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
@@ -167,7 +167,7 @@ JetFile: CallsInWhen.kt
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(DOT)('.')
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
@@ -189,7 +189,7 @@ JetFile: CallsInWhen.kt
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(DOT)('.')
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace(' ')
|
||||
|
||||
+8
-8
@@ -27,8 +27,8 @@ JetFile: Constructors.kt
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
DELEGATION_SPECIFIER_LIST
|
||||
DELEGATOR_SUPER_CLASS
|
||||
SUPER_TYPE_LIST
|
||||
SUPER_TYPE_ENTRY
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
@@ -52,8 +52,8 @@ JetFile: Constructors.kt
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
DELEGATION_SPECIFIER_LIST
|
||||
DELEGATOR_SUPER_CLASS
|
||||
SUPER_TYPE_LIST
|
||||
SUPER_TYPE_ENTRY
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
@@ -78,8 +78,8 @@ JetFile: Constructors.kt
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
DELEGATION_SPECIFIER_LIST
|
||||
DELEGATOR_SUPER_CLASS
|
||||
SUPER_TYPE_LIST
|
||||
SUPER_TYPE_ENTRY
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
@@ -108,8 +108,8 @@ JetFile: Constructors.kt
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
DELEGATION_SPECIFIER_LIST
|
||||
DELEGATOR_SUPER_CLASS
|
||||
SUPER_TYPE_LIST
|
||||
SUPER_TYPE_ENTRY
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
|
||||
+2
-2
@@ -29,8 +29,8 @@ JetFile: DynamicSoftKeyword.kt
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
DELEGATION_SPECIFIER_LIST
|
||||
DELEGATOR_SUPER_CLASS
|
||||
SUPER_TYPE_LIST
|
||||
SUPER_TYPE_ENTRY
|
||||
TYPE_REFERENCE
|
||||
DYNAMIC_TYPE
|
||||
PsiElement(dynamic)('dynamic')
|
||||
|
||||
Vendored
+3
-3
@@ -133,17 +133,17 @@ JetFile: EmptyName.kt
|
||||
BLOCK
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
MULTI_VARIABLE_DECLARATION
|
||||
DESTRUCTURING_DECLARATION
|
||||
PsiElement(val)('val')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LPAR)('(')
|
||||
MULTI_VARIABLE_DECLARATION_ENTRY
|
||||
DESTRUCTURING_DECLARATION_ENTRY
|
||||
PsiElement(BAD_CHARACTER)('`')
|
||||
PsiErrorElement:Expecting a name
|
||||
PsiElement(BAD_CHARACTER)('`')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
MULTI_VARIABLE_DECLARATION_ENTRY
|
||||
DESTRUCTURING_DECLARATION_ENTRY
|
||||
PsiElement(IDENTIFIER)('y')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
|
||||
+3
-3
@@ -34,7 +34,7 @@ JetFile: EnumMissingName.kt
|
||||
ENUM_ENTRY
|
||||
PsiElement(IDENTIFIER)('RED')
|
||||
INITIALIZER_LIST
|
||||
DELEGATOR_SUPER_CALL
|
||||
SUPER_TYPE_CALL_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
@@ -51,7 +51,7 @@ JetFile: EnumMissingName.kt
|
||||
ENUM_ENTRY
|
||||
PsiElement(IDENTIFIER)('GREEN')
|
||||
INITIALIZER_LIST
|
||||
DELEGATOR_SUPER_CALL
|
||||
SUPER_TYPE_CALL_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
@@ -68,7 +68,7 @@ JetFile: EnumMissingName.kt
|
||||
ENUM_ENTRY
|
||||
PsiElement(IDENTIFIER)('BLUE')
|
||||
INITIALIZER_LIST
|
||||
DELEGATOR_SUPER_CALL
|
||||
SUPER_TYPE_CALL_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
|
||||
+3
-3
@@ -32,7 +32,7 @@ JetFile: EnumShortCommas.kt
|
||||
ENUM_ENTRY
|
||||
PsiElement(IDENTIFIER)('RED')
|
||||
INITIALIZER_LIST
|
||||
DELEGATOR_SUPER_CALL
|
||||
SUPER_TYPE_CALL_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
@@ -49,7 +49,7 @@ JetFile: EnumShortCommas.kt
|
||||
ENUM_ENTRY
|
||||
PsiElement(IDENTIFIER)('GREEN')
|
||||
INITIALIZER_LIST
|
||||
DELEGATOR_SUPER_CALL
|
||||
SUPER_TYPE_CALL_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
@@ -66,7 +66,7 @@ JetFile: EnumShortCommas.kt
|
||||
ENUM_ENTRY
|
||||
PsiElement(IDENTIFIER)('BLUE')
|
||||
INITIALIZER_LIST
|
||||
DELEGATOR_SUPER_CALL
|
||||
SUPER_TYPE_CALL_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
|
||||
+3
-3
@@ -32,7 +32,7 @@ JetFile: EnumShortWithOverload.kt
|
||||
ENUM_ENTRY
|
||||
PsiElement(IDENTIFIER)('RED')
|
||||
INITIALIZER_LIST
|
||||
DELEGATOR_SUPER_CALL
|
||||
SUPER_TYPE_CALL_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
@@ -82,7 +82,7 @@ JetFile: EnumShortWithOverload.kt
|
||||
ENUM_ENTRY
|
||||
PsiElement(IDENTIFIER)('GREEN')
|
||||
INITIALIZER_LIST
|
||||
DELEGATOR_SUPER_CALL
|
||||
SUPER_TYPE_CALL_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
@@ -132,7 +132,7 @@ JetFile: EnumShortWithOverload.kt
|
||||
ENUM_ENTRY
|
||||
PsiElement(IDENTIFIER)('BLUE')
|
||||
INITIALIZER_LIST
|
||||
DELEGATOR_SUPER_CALL
|
||||
SUPER_TYPE_CALL_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
|
||||
Vendored
+3
-3
@@ -32,7 +32,7 @@ JetFile: Enums.kt
|
||||
ENUM_ENTRY
|
||||
PsiElement(IDENTIFIER)('RED')
|
||||
INITIALIZER_LIST
|
||||
DELEGATOR_SUPER_CALL
|
||||
SUPER_TYPE_CALL_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
@@ -49,7 +49,7 @@ JetFile: Enums.kt
|
||||
ENUM_ENTRY
|
||||
PsiElement(IDENTIFIER)('GREEN')
|
||||
INITIALIZER_LIST
|
||||
DELEGATOR_SUPER_CALL
|
||||
SUPER_TYPE_CALL_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
@@ -66,7 +66,7 @@ JetFile: Enums.kt
|
||||
ENUM_ENTRY
|
||||
PsiElement(IDENTIFIER)('BLUE')
|
||||
INITIALIZER_LIST
|
||||
DELEGATOR_SUPER_CALL
|
||||
SUPER_TYPE_CALL_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
|
||||
+55
-55
@@ -18,9 +18,9 @@ JetFile: ForWithMultiDecl.kt
|
||||
PsiElement(for)('for')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LPAR)('(')
|
||||
MULTI_VARIABLE_DECLARATION
|
||||
DESTRUCTURING_DECLARATION
|
||||
PsiElement(LPAR)('(')
|
||||
MULTI_VARIABLE_DECLARATION_ENTRY
|
||||
DESTRUCTURING_DECLARATION_ENTRY
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -40,13 +40,13 @@ JetFile: ForWithMultiDecl.kt
|
||||
PsiElement(for)('for')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LPAR)('(')
|
||||
MULTI_VARIABLE_DECLARATION
|
||||
DESTRUCTURING_DECLARATION
|
||||
PsiElement(LPAR)('(')
|
||||
MULTI_VARIABLE_DECLARATION_ENTRY
|
||||
DESTRUCTURING_DECLARATION_ENTRY
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
MULTI_VARIABLE_DECLARATION_ENTRY
|
||||
DESTRUCTURING_DECLARATION_ENTRY
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -66,9 +66,9 @@ JetFile: ForWithMultiDecl.kt
|
||||
PsiElement(for)('for')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LPAR)('(')
|
||||
MULTI_VARIABLE_DECLARATION
|
||||
DESTRUCTURING_DECLARATION
|
||||
PsiElement(LPAR)('(')
|
||||
MULTI_VARIABLE_DECLARATION_ENTRY
|
||||
DESTRUCTURING_DECLARATION_ENTRY
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -78,7 +78,7 @@ JetFile: ForWithMultiDecl.kt
|
||||
PsiElement(IDENTIFIER)('Int')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
MULTI_VARIABLE_DECLARATION_ENTRY
|
||||
DESTRUCTURING_DECLARATION_ENTRY
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -104,9 +104,9 @@ JetFile: ForWithMultiDecl.kt
|
||||
PsiElement(for)('for')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LPAR)('(')
|
||||
MULTI_VARIABLE_DECLARATION
|
||||
DESTRUCTURING_DECLARATION
|
||||
PsiElement(LPAR)('(')
|
||||
MULTI_VARIABLE_DECLARATION_ENTRY
|
||||
DESTRUCTURING_DECLARATION_ENTRY
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -116,7 +116,7 @@ JetFile: ForWithMultiDecl.kt
|
||||
PsiElement(IDENTIFIER)('Int')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
MULTI_VARIABLE_DECLARATION_ENTRY
|
||||
DESTRUCTURING_DECLARATION_ENTRY
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -136,13 +136,13 @@ JetFile: ForWithMultiDecl.kt
|
||||
PsiElement(for)('for')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LPAR)('(')
|
||||
MULTI_VARIABLE_DECLARATION
|
||||
DESTRUCTURING_DECLARATION
|
||||
PsiElement(LPAR)('(')
|
||||
MULTI_VARIABLE_DECLARATION_ENTRY
|
||||
DESTRUCTURING_DECLARATION_ENTRY
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
MULTI_VARIABLE_DECLARATION_ENTRY
|
||||
DESTRUCTURING_DECLARATION_ENTRY
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -168,11 +168,11 @@ JetFile: ForWithMultiDecl.kt
|
||||
PsiElement(for)('for')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LPAR)('(')
|
||||
MULTI_VARIABLE_DECLARATION
|
||||
DESTRUCTURING_DECLARATION
|
||||
PsiElement(val)('val')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LPAR)('(')
|
||||
MULTI_VARIABLE_DECLARATION_ENTRY
|
||||
DESTRUCTURING_DECLARATION_ENTRY
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -192,15 +192,15 @@ JetFile: ForWithMultiDecl.kt
|
||||
PsiElement(for)('for')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LPAR)('(')
|
||||
MULTI_VARIABLE_DECLARATION
|
||||
DESTRUCTURING_DECLARATION
|
||||
PsiElement(val)('val')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LPAR)('(')
|
||||
MULTI_VARIABLE_DECLARATION_ENTRY
|
||||
DESTRUCTURING_DECLARATION_ENTRY
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
MULTI_VARIABLE_DECLARATION_ENTRY
|
||||
DESTRUCTURING_DECLARATION_ENTRY
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -220,11 +220,11 @@ JetFile: ForWithMultiDecl.kt
|
||||
PsiElement(for)('for')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LPAR)('(')
|
||||
MULTI_VARIABLE_DECLARATION
|
||||
DESTRUCTURING_DECLARATION
|
||||
PsiElement(val)('val')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LPAR)('(')
|
||||
MULTI_VARIABLE_DECLARATION_ENTRY
|
||||
DESTRUCTURING_DECLARATION_ENTRY
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -234,7 +234,7 @@ JetFile: ForWithMultiDecl.kt
|
||||
PsiElement(IDENTIFIER)('Int')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
MULTI_VARIABLE_DECLARATION_ENTRY
|
||||
DESTRUCTURING_DECLARATION_ENTRY
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -260,11 +260,11 @@ JetFile: ForWithMultiDecl.kt
|
||||
PsiElement(for)('for')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LPAR)('(')
|
||||
MULTI_VARIABLE_DECLARATION
|
||||
DESTRUCTURING_DECLARATION
|
||||
PsiElement(val)('val')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LPAR)('(')
|
||||
MULTI_VARIABLE_DECLARATION_ENTRY
|
||||
DESTRUCTURING_DECLARATION_ENTRY
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -274,7 +274,7 @@ JetFile: ForWithMultiDecl.kt
|
||||
PsiElement(IDENTIFIER)('Int')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
MULTI_VARIABLE_DECLARATION_ENTRY
|
||||
DESTRUCTURING_DECLARATION_ENTRY
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -294,15 +294,15 @@ JetFile: ForWithMultiDecl.kt
|
||||
PsiElement(for)('for')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LPAR)('(')
|
||||
MULTI_VARIABLE_DECLARATION
|
||||
DESTRUCTURING_DECLARATION
|
||||
PsiElement(val)('val')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LPAR)('(')
|
||||
MULTI_VARIABLE_DECLARATION_ENTRY
|
||||
DESTRUCTURING_DECLARATION_ENTRY
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
MULTI_VARIABLE_DECLARATION_ENTRY
|
||||
DESTRUCTURING_DECLARATION_ENTRY
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -328,11 +328,11 @@ JetFile: ForWithMultiDecl.kt
|
||||
PsiElement(for)('for')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LPAR)('(')
|
||||
MULTI_VARIABLE_DECLARATION
|
||||
DESTRUCTURING_DECLARATION
|
||||
PsiElement(var)('var')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LPAR)('(')
|
||||
MULTI_VARIABLE_DECLARATION_ENTRY
|
||||
DESTRUCTURING_DECLARATION_ENTRY
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -352,15 +352,15 @@ JetFile: ForWithMultiDecl.kt
|
||||
PsiElement(for)('for')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LPAR)('(')
|
||||
MULTI_VARIABLE_DECLARATION
|
||||
DESTRUCTURING_DECLARATION
|
||||
PsiElement(var)('var')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LPAR)('(')
|
||||
MULTI_VARIABLE_DECLARATION_ENTRY
|
||||
DESTRUCTURING_DECLARATION_ENTRY
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
MULTI_VARIABLE_DECLARATION_ENTRY
|
||||
DESTRUCTURING_DECLARATION_ENTRY
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -380,11 +380,11 @@ JetFile: ForWithMultiDecl.kt
|
||||
PsiElement(for)('for')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LPAR)('(')
|
||||
MULTI_VARIABLE_DECLARATION
|
||||
DESTRUCTURING_DECLARATION
|
||||
PsiElement(var)('var')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LPAR)('(')
|
||||
MULTI_VARIABLE_DECLARATION_ENTRY
|
||||
DESTRUCTURING_DECLARATION_ENTRY
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -394,7 +394,7 @@ JetFile: ForWithMultiDecl.kt
|
||||
PsiElement(IDENTIFIER)('Int')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
MULTI_VARIABLE_DECLARATION_ENTRY
|
||||
DESTRUCTURING_DECLARATION_ENTRY
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -420,11 +420,11 @@ JetFile: ForWithMultiDecl.kt
|
||||
PsiElement(for)('for')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LPAR)('(')
|
||||
MULTI_VARIABLE_DECLARATION
|
||||
DESTRUCTURING_DECLARATION
|
||||
PsiElement(var)('var')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LPAR)('(')
|
||||
MULTI_VARIABLE_DECLARATION_ENTRY
|
||||
DESTRUCTURING_DECLARATION_ENTRY
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -434,7 +434,7 @@ JetFile: ForWithMultiDecl.kt
|
||||
PsiElement(IDENTIFIER)('Int')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
MULTI_VARIABLE_DECLARATION_ENTRY
|
||||
DESTRUCTURING_DECLARATION_ENTRY
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -454,15 +454,15 @@ JetFile: ForWithMultiDecl.kt
|
||||
PsiElement(for)('for')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LPAR)('(')
|
||||
MULTI_VARIABLE_DECLARATION
|
||||
DESTRUCTURING_DECLARATION
|
||||
PsiElement(var)('var')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LPAR)('(')
|
||||
MULTI_VARIABLE_DECLARATION_ENTRY
|
||||
DESTRUCTURING_DECLARATION_ENTRY
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
MULTI_VARIABLE_DECLARATION_ENTRY
|
||||
DESTRUCTURING_DECLARATION_ENTRY
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -488,9 +488,9 @@ JetFile: ForWithMultiDecl.kt
|
||||
PsiElement(for)('for')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LPAR)('(')
|
||||
MULTI_VARIABLE_DECLARATION
|
||||
DESTRUCTURING_DECLARATION
|
||||
PsiElement(LPAR)('(')
|
||||
MULTI_VARIABLE_DECLARATION_ENTRY
|
||||
DESTRUCTURING_DECLARATION_ENTRY
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiErrorElement:Expecting ')'
|
||||
<empty list>
|
||||
@@ -511,9 +511,9 @@ JetFile: ForWithMultiDecl.kt
|
||||
PsiElement(for)('for')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LPAR)('(')
|
||||
MULTI_VARIABLE_DECLARATION
|
||||
DESTRUCTURING_DECLARATION
|
||||
PsiElement(LPAR)('(')
|
||||
MULTI_VARIABLE_DECLARATION_ENTRY
|
||||
DESTRUCTURING_DECLARATION_ENTRY
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiErrorElement:Expecting a name
|
||||
@@ -537,9 +537,9 @@ JetFile: ForWithMultiDecl.kt
|
||||
PsiElement(for)('for')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LPAR)('(')
|
||||
MULTI_VARIABLE_DECLARATION
|
||||
DESTRUCTURING_DECLARATION
|
||||
PsiElement(LPAR)('(')
|
||||
MULTI_VARIABLE_DECLARATION_ENTRY
|
||||
DESTRUCTURING_DECLARATION_ENTRY
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -564,9 +564,9 @@ JetFile: ForWithMultiDecl.kt
|
||||
PsiElement(for)('for')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LPAR)('(')
|
||||
MULTI_VARIABLE_DECLARATION
|
||||
DESTRUCTURING_DECLARATION
|
||||
PsiElement(LPAR)('(')
|
||||
MULTI_VARIABLE_DECLARATION_ENTRY
|
||||
DESTRUCTURING_DECLARATION_ENTRY
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -595,12 +595,12 @@ JetFile: ForWithMultiDecl.kt
|
||||
PsiElement(for)('for')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LPAR)('(')
|
||||
MULTI_VARIABLE_DECLARATION
|
||||
DESTRUCTURING_DECLARATION
|
||||
PsiElement(LPAR)('(')
|
||||
PsiErrorElement:Expecting a name
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
MULTI_VARIABLE_DECLARATION_ENTRY
|
||||
DESTRUCTURING_DECLARATION_ENTRY
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -626,9 +626,9 @@ JetFile: ForWithMultiDecl.kt
|
||||
PsiElement(for)('for')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LPAR)('(')
|
||||
MULTI_VARIABLE_DECLARATION
|
||||
DESTRUCTURING_DECLARATION
|
||||
PsiElement(LPAR)('(')
|
||||
MULTI_VARIABLE_DECLARATION_ENTRY
|
||||
DESTRUCTURING_DECLARATION_ENTRY
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -651,7 +651,7 @@ JetFile: ForWithMultiDecl.kt
|
||||
PsiElement(for)('for')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LPAR)('(')
|
||||
MULTI_VARIABLE_DECLARATION
|
||||
DESTRUCTURING_DECLARATION
|
||||
PsiElement(LPAR)('(')
|
||||
PsiErrorElement:Expecting a name
|
||||
<empty list>
|
||||
|
||||
+11
-11
@@ -64,8 +64,8 @@ JetFile: FunctionCalls.kt
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('i')
|
||||
PsiWhiteSpace(' ')
|
||||
FUNCTION_LITERAL_ARGUMENT
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_ARGUMENT
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
@@ -77,7 +77,7 @@ JetFile: FunctionCalls.kt
|
||||
PsiElement(IDENTIFIER)('j')
|
||||
PsiElement(SEMICOLON)(';')
|
||||
PsiWhiteSpace('\n ')
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
@@ -89,8 +89,8 @@ JetFile: FunctionCalls.kt
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('k')
|
||||
PsiWhiteSpace(' ')
|
||||
FUNCTION_LITERAL_ARGUMENT
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_ARGUMENT
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
@@ -110,8 +110,8 @@ JetFile: FunctionCalls.kt
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
FUNCTION_LITERAL_ARGUMENT
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_ARGUMENT
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
@@ -132,7 +132,7 @@ JetFile: FunctionCalls.kt
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(SEMICOLON)(';')
|
||||
PsiWhiteSpace('\n ')
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
@@ -160,8 +160,8 @@ JetFile: FunctionCalls.kt
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
FUNCTION_LITERAL_ARGUMENT
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_ARGUMENT
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
@@ -190,7 +190,7 @@ JetFile: FunctionCalls.kt
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(SEMICOLON)(';')
|
||||
PsiWhiteSpace('\n ')
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
|
||||
+6
-6
@@ -765,8 +765,8 @@ JetFile: FunctionExpressions.kt
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
PsiWhiteSpace(' ')
|
||||
FUNCTION_LITERAL_ARGUMENT
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_ARGUMENT
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
@@ -857,8 +857,8 @@ JetFile: FunctionExpressions.kt
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
PsiWhiteSpace(' ')
|
||||
FUNCTION_LITERAL_ARGUMENT
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_ARGUMENT
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
@@ -890,8 +890,8 @@ JetFile: FunctionExpressions.kt
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
PsiWhiteSpace(' ')
|
||||
FUNCTION_LITERAL_ARGUMENT
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_ARGUMENT
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
|
||||
+8
-8
@@ -14,14 +14,14 @@ JetFile: FunctionLiterals.kt
|
||||
BLOCK
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
<empty list>
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
@@ -29,7 +29,7 @@ JetFile: FunctionLiterals.kt
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
VALUE_PARAMETER_LIST
|
||||
@@ -43,7 +43,7 @@ JetFile: FunctionLiterals.kt
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
VALUE_PARAMETER_LIST
|
||||
@@ -61,7 +61,7 @@ JetFile: FunctionLiterals.kt
|
||||
PsiElement(INTEGER_LITERAL)('1')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
VALUE_PARAMETER_LIST
|
||||
@@ -81,7 +81,7 @@ JetFile: FunctionLiterals.kt
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n ')
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
VALUE_PARAMETER_LIST
|
||||
@@ -105,7 +105,7 @@ JetFile: FunctionLiterals.kt
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n ')
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
VALUE_PARAMETER_LIST
|
||||
@@ -135,7 +135,7 @@ JetFile: FunctionLiterals.kt
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n ')
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
VALUE_PARAMETER_LIST
|
||||
|
||||
+42
-42
@@ -14,7 +14,7 @@ JetFile: FunctionLiterals_ERR.kt
|
||||
BLOCK
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -27,7 +27,7 @@ JetFile: FunctionLiterals_ERR.kt
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
@@ -44,7 +44,7 @@ JetFile: FunctionLiterals_ERR.kt
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n ')
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
@@ -65,7 +65,7 @@ JetFile: FunctionLiterals_ERR.kt
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n ')
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
@@ -89,7 +89,7 @@ JetFile: FunctionLiterals_ERR.kt
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n ')
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
@@ -108,7 +108,7 @@ JetFile: FunctionLiterals_ERR.kt
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
@@ -128,7 +128,7 @@ JetFile: FunctionLiterals_ERR.kt
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n ')
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
@@ -159,7 +159,7 @@ JetFile: FunctionLiterals_ERR.kt
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n ')
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
@@ -192,7 +192,7 @@ JetFile: FunctionLiterals_ERR.kt
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
@@ -216,7 +216,7 @@ JetFile: FunctionLiterals_ERR.kt
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n ')
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
@@ -248,7 +248,7 @@ JetFile: FunctionLiterals_ERR.kt
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
VALUE_PARAMETER_LIST
|
||||
@@ -273,7 +273,7 @@ JetFile: FunctionLiterals_ERR.kt
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n ')
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
VALUE_PARAMETER_LIST
|
||||
@@ -297,7 +297,7 @@ JetFile: FunctionLiterals_ERR.kt
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n ')
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
VALUE_PARAMETER_LIST
|
||||
@@ -316,7 +316,7 @@ JetFile: FunctionLiterals_ERR.kt
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n ')
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
VALUE_PARAMETER_LIST
|
||||
@@ -334,7 +334,7 @@ JetFile: FunctionLiterals_ERR.kt
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
VALUE_PARAMETER_LIST
|
||||
@@ -356,7 +356,7 @@ JetFile: FunctionLiterals_ERR.kt
|
||||
<empty list>
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n ')
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
VALUE_PARAMETER_LIST
|
||||
@@ -377,7 +377,7 @@ JetFile: FunctionLiterals_ERR.kt
|
||||
<empty list>
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
@@ -398,7 +398,7 @@ JetFile: FunctionLiterals_ERR.kt
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
@@ -416,7 +416,7 @@ JetFile: FunctionLiterals_ERR.kt
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n ')
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
@@ -438,7 +438,7 @@ JetFile: FunctionLiterals_ERR.kt
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n ')
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
@@ -457,7 +457,7 @@ JetFile: FunctionLiterals_ERR.kt
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n ')
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
VALUE_PARAMETER_LIST
|
||||
@@ -472,7 +472,7 @@ JetFile: FunctionLiterals_ERR.kt
|
||||
<empty list>
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
@@ -488,7 +488,7 @@ JetFile: FunctionLiterals_ERR.kt
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n ')
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
@@ -510,7 +510,7 @@ JetFile: FunctionLiterals_ERR.kt
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
@@ -536,7 +536,7 @@ JetFile: FunctionLiterals_ERR.kt
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n ')
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
@@ -556,7 +556,7 @@ JetFile: FunctionLiterals_ERR.kt
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
@@ -577,7 +577,7 @@ JetFile: FunctionLiterals_ERR.kt
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n ')
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
@@ -606,7 +606,7 @@ JetFile: FunctionLiterals_ERR.kt
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n ')
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
@@ -635,7 +635,7 @@ JetFile: FunctionLiterals_ERR.kt
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n ')
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
@@ -664,7 +664,7 @@ JetFile: FunctionLiterals_ERR.kt
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
@@ -680,7 +680,7 @@ JetFile: FunctionLiterals_ERR.kt
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n ')
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
@@ -696,7 +696,7 @@ JetFile: FunctionLiterals_ERR.kt
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n ')
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
@@ -716,7 +716,7 @@ JetFile: FunctionLiterals_ERR.kt
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n ')
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
@@ -736,7 +736,7 @@ JetFile: FunctionLiterals_ERR.kt
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
@@ -756,7 +756,7 @@ JetFile: FunctionLiterals_ERR.kt
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n ')
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
@@ -782,7 +782,7 @@ JetFile: FunctionLiterals_ERR.kt
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n ')
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
@@ -812,7 +812,7 @@ JetFile: FunctionLiterals_ERR.kt
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n ')
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
@@ -836,7 +836,7 @@ JetFile: FunctionLiterals_ERR.kt
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
@@ -877,7 +877,7 @@ JetFile: FunctionLiterals_ERR.kt
|
||||
PsiElement(INTEGER_LITERAL)('1')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
@@ -898,7 +898,7 @@ JetFile: FunctionLiterals_ERR.kt
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(object)('object')
|
||||
PsiWhiteSpace(' ')
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -942,7 +942,7 @@ JetFile: FunctionLiterals_ERR.kt
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n ')
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -980,7 +980,7 @@ JetFile: FunctionLiterals_ERR.kt
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n ')
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
BLOCK
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ JetFile: IncompleteFunctionLiteral.kt
|
||||
BLOCK
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
FUNCTION_LITERAL_EXPRESSION
|
||||
LAMBDA_EXPRESSION
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
VALUE_PARAMETER_LIST
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user