Skip to content

Commit fc50e81

Browse files
authored
Merge pull request #21705 from slavapestov/bogus-request-layout
Sema: Remove bogus call to requestNominalLayout()
2 parents dffa857 + 9cf1efb commit fc50e81

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

lib/Sema/CSApply.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7401,11 +7401,6 @@ Expr *ExprRewriter::finishApply(ApplyExpr *apply, Type openedType,
74017401
cs.setType(apply, fnType->getResult());
74027402
apply->setIsSuper(isSuper);
74037403

7404-
// We need the layout of nominal types returned from a function call.
7405-
if (auto nominalResult = fnType->getResult()->getAnyNominal()) {
7406-
tc.requestNominalLayout(nominalResult);
7407-
}
7408-
74097404
cs.setExprTypes(apply);
74107405
Expr *result = tc.substituteInputSugarTypeForResult(apply);
74117406
cs.cacheExprTypes(result);
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
// RUN: %target-typecheck-verify-swift -module-name test -primary-file %S/Inputs/require-layout-call-result-primary.swift
1+
// RUN: %target-swift-frontend -emit-ir -module-name test %s -primary-file %S/Inputs/require-layout-call-result-primary.swift
22

33

44
class C<T> {
5-
dynamic func broken() { } // expected-error{{'dynamic'}}
5+
func broken() { }
66
}
77

88
func bar<T, U: C<T>>(_ t: T, _ u: U) -> C<T> { return u }

0 commit comments

Comments
 (0)