bug fix
do not combine receiverInfo with error selectorInfo
This commit is contained in:
+4
-1
@@ -133,6 +133,9 @@ public class DataFlowValueFactory {
|
||||
|
||||
@NotNull
|
||||
private static IdentifierInfo combineInfo(@Nullable IdentifierInfo receiverInfo, @NotNull IdentifierInfo selectorInfo) {
|
||||
if (selectorInfo.id == null) {
|
||||
return ERROR_IDENTIFIER_INFO;
|
||||
}
|
||||
if (receiverInfo == null || receiverInfo == ERROR_IDENTIFIER_INFO || receiverInfo.isNamespace) {
|
||||
return selectorInfo;
|
||||
}
|
||||
@@ -182,7 +185,7 @@ public class DataFlowValueFactory {
|
||||
DeclarationDescriptor declarationDescriptor = bindingContext.get(REFERENCE_TARGET, simpleNameExpression);
|
||||
if (declarationDescriptor instanceof VariableDescriptor) {
|
||||
ResolvedCall<?> resolvedCall = bindingContext.get(RESOLVED_CALL, simpleNameExpression);
|
||||
// todo return assert
|
||||
// todo uncomment assert
|
||||
// for now it fails for resolving 'invoke' convention, return it after 'invoke' algorithm changes
|
||||
// assert resolvedCall != null : "Cannot create right identifier info if the resolved call is not known yet for " + declarationDescriptor;
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
package foo
|
||||
|
||||
fun dispatch(request: Request) {
|
||||
val <!UNUSED_VARIABLE!>url<!> = request.getRequestURI() as String
|
||||
|
||||
if (request.getMethod()?.length != 0) {
|
||||
}
|
||||
}
|
||||
|
||||
trait Request {
|
||||
fun getRequestURI(): String?
|
||||
fun getMethod(): String?
|
||||
}
|
||||
Reference in New Issue
Block a user