[NI] Remove hack for special functions
Treating special functions for `if`, `when`, `try`, `?:` as not accepting `Nothing` result type is incorrect. Making so leads to cases with uninferred `Nothing` result type for inner calls and lost data flow info.
This commit is contained in:
-8
@@ -97,12 +97,4 @@ class KotlinResolutionStatelessCallbacksImpl(
|
||||
else
|
||||
ConstraintSystemBuilderImpl.forSpecificity()
|
||||
}
|
||||
|
||||
override fun isSpecialFunctionTypeParameterName(name: Name): Boolean {
|
||||
return ControlStructureTypingUtils.ResolveConstruct.values().any { it.specialTypeParameterName == name }
|
||||
}
|
||||
|
||||
override fun isExclExclTypeParameterName(name: Name): Boolean {
|
||||
return name == ControlStructureTypingUtils.ResolveConstruct.EXCL_EXCL.specialTypeParameterName
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user