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:
Joe Groff
2016-07-29 13:28:22 -07:00
parent 2c85b5dd72
commit 11f03cd8b5
27 changed files with 83 additions and 125 deletions

View File

@@ -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) \