DataFlowInfo.getPossibleTypes() with two arguments rolled back
This commit is contained in:
@@ -40,16 +40,9 @@ public interface DataFlowInfo {
|
||||
@NotNull
|
||||
Nullability getNullability(@NotNull DataFlowValue key);
|
||||
|
||||
/**
|
||||
* Gets a set of all possible types for this value, INCLUDING the original (native) type
|
||||
*/
|
||||
@NotNull
|
||||
Set<JetType> getPossibleTypes(@NotNull DataFlowValue key, boolean withOriginalType);
|
||||
|
||||
/**
|
||||
* IMPORTANT: by default, the original (native) type for this value
|
||||
* are NOT included. So it's quite possible to get an empty set here.
|
||||
* If you need also the original type, use getPossibleTypes(key, true)
|
||||
*/
|
||||
@NotNull
|
||||
Set<JetType> getPossibleTypes(@NotNull DataFlowValue key);
|
||||
|
||||
-9
@@ -131,17 +131,8 @@ import static org.jetbrains.kotlin.resolve.calls.smartcasts.Nullability.NOT_NULL
|
||||
@Override
|
||||
@NotNull
|
||||
public Set<JetType> getPossibleTypes(@NotNull DataFlowValue key) {
|
||||
return getPossibleTypes(key, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public Set<JetType> getPossibleTypes(@NotNull DataFlowValue key, boolean withOriginalType) {
|
||||
JetType originalType = key.getType();
|
||||
Set<JetType> types = collectTypesFromMeAndParents(key);
|
||||
if (withOriginalType) {
|
||||
types.add(originalType);
|
||||
}
|
||||
if (getNullability(key).canBeNull()) {
|
||||
return types;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user