File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -4429,7 +4429,18 @@ namespace {
4429
4429
cs.TC .requestMemberLayout (subscript);
4430
4430
4431
4431
auto dc = subscript->getInnermostDeclContext ();
4432
- auto indexType = subscript->getIndicesInterfaceType ();
4432
+
4433
+ // FIXME: It's not correct to turn the subscript's parameter list
4434
+ // into a single type here. Further down we pass it to coerceToType(),
4435
+ // but the rules for argument list conversions are different than
4436
+ // tuple conversions, and coerceToType() doesn't handle varargs or
4437
+ // default arguments.
4438
+ auto indexType = AnyFunctionType::composeInput (
4439
+ cs.TC .Context ,
4440
+ subscript->getInterfaceType ()
4441
+ ->castTo <AnyFunctionType>()
4442
+ ->getParams (),
4443
+ /* canonicalVararg=*/ false );
4433
4444
4434
4445
SubstitutionMap subs;
4435
4446
if (auto sig = dc->getGenericSignatureOfContext ()) {
You can’t perform that action at this time.
0 commit comments