TypeUtils.containsSpecialType() fixed to account for flexible types
This commit is contained in:
@@ -0,0 +1,3 @@
|
|||||||
|
package
|
||||||
|
|
||||||
|
internal fun test(): kotlin.Unit
|
||||||
@@ -533,6 +533,11 @@ public class TypeUtils {
|
|||||||
) {
|
) {
|
||||||
if (type == null) return false;
|
if (type == null) return false;
|
||||||
if (isSpecialType.invoke(type)) return true;
|
if (isSpecialType.invoke(type)) return true;
|
||||||
|
Flexibility flexibility = type.getCapability(Flexibility.class);
|
||||||
|
if (flexibility != null
|
||||||
|
&& (containsSpecialType(flexibility.getLowerBound(), isSpecialType) || containsSpecialType(flexibility.getUpperBound(), isSpecialType))) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
for (TypeProjection projection : type.getArguments()) {
|
for (TypeProjection projection : type.getArguments()) {
|
||||||
if (containsSpecialType(projection.getType(), isSpecialType)) return true;
|
if (containsSpecialType(projection.getType(), isSpecialType)) return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user