mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
StringOptimization: don't constant fold dynamic Self type names.
This wrongly results in "Self" instead of the real type name. rdar://76113269
This commit is contained in:
@@ -300,7 +300,7 @@ bool StringOptimization::optimizeTypeName(ApplyInst *typeNameCall) {
|
||||
|
||||
auto metatype = metatypeInst->getType().getAs<MetatypeType>();
|
||||
Type ty = metatype->getInstanceType();
|
||||
if (ty->hasArchetype())
|
||||
if (ty->hasArchetype() || ty->hasDynamicSelfType())
|
||||
return false;
|
||||
|
||||
// Usually the "qualified" parameter of _typeName() is a constant boolean.
|
||||
|
||||
Reference in New Issue
Block a user