[TypeChecker] Address review comments

* Incomplete conformance is not necessarily going to produce a diagnostic
* Use `userFacingName` to avoid assert related to special names.
This commit is contained in:
Pavel Yaskevich
2019-01-07 10:53:48 -08:00
parent 64fa0ee729
commit 91724c9918
2 changed files with 3 additions and 4 deletions

View File

@@ -1582,7 +1582,7 @@ namespace {
// If this is `Builtin.trigger_fallback_diagnostic()`, fail
// without producing any diagnostics, in order to test fallback error.
if (isTriggerFallbackDiagnosticBuiltin(expr, CS.getASTContext()))
return nullptr;
return Type();
// Open a member constraint for constructor delegations on the
// subexpr type.
@@ -3143,7 +3143,7 @@ namespace {
if (DRE->getDecl() != Context.TheBuiltinModule)
return false;
auto member = UDE->getName().getBaseIdentifier().str();
auto member = UDE->getName().getBaseName().userFacingName();
return member.equals("trigger_fallback_diagnostic");
}