mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge pull request #14411 from aschwaighofer/sema_require_layout_generic_params
Sema: Request the layout for generic parameters if there is a body
This commit is contained in:
@@ -7494,6 +7494,10 @@ namespace {
|
||||
if (tc.coerceParameterListToType(params, closure, fnType))
|
||||
return { false, nullptr };
|
||||
|
||||
// Require layout of dependent types that could be used to materialize
|
||||
// metadata types/conformances during IRGen.
|
||||
tc.requestRequiredNominalTypeLayoutForParameters(params);
|
||||
|
||||
// If this is a single-expression closure, convert the expression
|
||||
// in the body to the result type of the closure.
|
||||
if (closure->hasSingleExpressionBody()) {
|
||||
|
||||
Reference in New Issue
Block a user