[CS] Remove external type logic from getTypeForPattern

This shouldn't be necessary, we should be able to
solve with type variables instead. This makes sure
we don't end up with weird special cases that only
occur when an external type is present.
This commit is contained in:
Hamish Knight
2023-06-02 17:58:59 +01:00
parent 23dbf6f106
commit 8d2f2baff0
3 changed files with 15 additions and 78 deletions

View File

@@ -8756,7 +8756,7 @@ bool InvalidWeakAttributeUse::diagnoseAsError() {
return false;
auto *var = pattern->getDecl();
auto varType = OptionalType::get(getType(var));
auto varType = getType(var);
auto diagnostic =
emitDiagnosticAt(var, diag::invalid_ownership_not_optional,