mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Sema: Don't try bridged classes as default literal types.
One last bit of SE-0072. We shouldn't fall back to bridged classes in the absence of type context for literals anymore. By itself, this kind of hoses the use of literals with NS types, but I think we can get most of the QoI back with overlay changes I plan to propose following this.
This commit is contained in:
@@ -256,15 +256,6 @@ getAlternativeLiteralTypes(KnownProtocolKind kind) {
|
||||
|
||||
SmallVector<Type, 4> types;
|
||||
|
||||
// If the default literal type is bridged to a class type, add the class type.
|
||||
if (auto proto = TC.Context.getProtocol(kind)) {
|
||||
if (auto defaultType = TC.getDefaultType(proto, DC)) {
|
||||
if (auto bridgedClassType = TC.getBridgedToObjC(DC, defaultType)) {
|
||||
types.push_back(bridgedClassType);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Some literal kinds are related.
|
||||
switch (kind) {
|
||||
#define PROTOCOL_WITH_NAME(Id, Name) \
|
||||
|
||||
Reference in New Issue
Block a user