DataFlowInfo.getPossibleTypes() with two arguments rolled back

This commit is contained in:
Mikhail Glukhikh
2015-04-20 12:01:46 +03:00
parent 2f88f830b8
commit 853483cf38
2 changed files with 0 additions and 16 deletions
@@ -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);
@@ -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;
}