swift icon indicating copy to clipboard operation
swift copied to clipboard

[Sema] Dig out other constructor if call is wrapped in a Dot-Call

Open AdamCmiel opened this issue 9 months ago • 3 comments

Guessing this bug /feature is introduced in CSApply ExprRewriter::buildMemberRef but didn't dig deep enough to find there. If a derived class' designated initializer initializes all stored let properties before calling super.init(), we don't properly type-check the chained init call. This does not happen if the stored properties are var or default initialized. We can however dig the OtherConstructorDeclRefExpr out of the semanticFn of the DotSyntaxCallExpr and proceed as normal.

Resolves #80311, #65316

AdamCmiel avatar Mar 27 '25 04:03 AdamCmiel

@swift-ci please test

drodriguez avatar Mar 27 '25 07:03 drodriguez

@swift-ci please test

drodriguez avatar Apr 02 '25 15:04 drodriguez

@swift-ci please test

AdamCmiel avatar Apr 09 '25 15:04 AdamCmiel

@swift-ci please test

AdamCmiel avatar Apr 10 '25 16:04 AdamCmiel