small fixes after review
This commit is contained in:
+1
-2
@@ -817,9 +817,8 @@ public class BasicExpressionTypingVisitor extends ExpressionTypingVisitor {
|
||||
assert operationSign.getReferencedNameElementType() == JetTokens.EXCLEXCL;
|
||||
|
||||
Call call = createCallForSpecialConstruction(expression, Collections.singletonList(baseExpression));
|
||||
ResolvedCall<FunctionDescriptor> resolvedCall = resolveSpecialConstructionAsCall(
|
||||
resolveSpecialConstructionAsCall(
|
||||
call, "ExclExcl", Collections.singletonList("baseExpr"), Collections.singletonList(true), context, null);
|
||||
resolvedCall.getResultingDescriptor();
|
||||
JetTypeInfo baseTypeInfo = BindingContextUtils.getRecordedTypeInfo(baseExpression, context.trace.getBindingContext());
|
||||
assert baseTypeInfo != null : "Base expression was not processed: " + expression;
|
||||
JetType baseType = baseTypeInfo.getType();
|
||||
|
||||
+4
-2
@@ -122,7 +122,7 @@ public class ControlStructureTypingUtils {
|
||||
return function;
|
||||
}
|
||||
|
||||
/*package*/ static MutableDataFlowInfoForArguments createDataFlowInfoForArgumentsForCall(
|
||||
/*package*/ static MutableDataFlowInfoForArguments createIndependentDataFlowInfoForArgumentsForCall(
|
||||
final Map<ValueArgument, DataFlowInfo> dataFlowInfoForArgumentsMap
|
||||
) {
|
||||
return new MutableDataFlowInfoForArguments() {
|
||||
@@ -135,6 +135,7 @@ public class ControlStructureTypingUtils {
|
||||
|
||||
@Override
|
||||
public void updateInfo(@NotNull ValueArgument valueArgument, @NotNull DataFlowInfo dataFlowInfo) {
|
||||
//todo
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@@ -146,6 +147,7 @@ public class ControlStructureTypingUtils {
|
||||
@NotNull
|
||||
@Override
|
||||
public DataFlowInfo getResultInfo() {
|
||||
//todo merge and use
|
||||
return initialDataFlowInfo;
|
||||
}
|
||||
};
|
||||
@@ -159,7 +161,7 @@ public class ControlStructureTypingUtils {
|
||||
Map<ValueArgument, DataFlowInfo> dataFlowInfoForArgumentsMap = Maps.newHashMap();
|
||||
dataFlowInfoForArgumentsMap.put(callForIf.getValueArguments().get(0), thenInfo);
|
||||
dataFlowInfoForArgumentsMap.put(callForIf.getValueArguments().get(1), elseInfo);
|
||||
return createDataFlowInfoForArgumentsForCall(dataFlowInfoForArgumentsMap);
|
||||
return createIndependentDataFlowInfoForArgumentsForCall(dataFlowInfoForArgumentsMap);
|
||||
}
|
||||
|
||||
/*package*/ static Call createCallForSpecialConstruction(
|
||||
|
||||
@@ -15,6 +15,7 @@ fun test(a: A, b: B, c: C) {
|
||||
val d: C = id(a)
|
||||
val e: Any = id(a)
|
||||
val f = id(a)
|
||||
f: A
|
||||
val g = two(a, b)
|
||||
g: B
|
||||
g: A
|
||||
|
||||
Reference in New Issue
Block a user