Skip to content

Conversation

@AdamCmiel
Copy link

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

@drodriguez
Copy link
Contributor

@swift-ci please test

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.
@drodriguez
Copy link
Contributor

@swift-ci please test

2 similar comments
@AdamCmiel
Copy link
Author

@swift-ci please test

@AdamCmiel
Copy link
Author

@swift-ci please test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Confusing designated initializer rules

2 participants