Skip to content

AST: Types nested inside a subclass shadow types in the superclass with same name #27365

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 26, 2019

Conversation

slavapestov
Copy link
Contributor

@slavapestov slavapestov commented Sep 25, 2019

The existing rules sometimes behaved this way, because validateDecl()
bails out silently without error on circularity.

Let's make this explicit instead, and get it working in all cases.

Fixes https://bugs.swift.org/browse/SR-3492, rdar://problem/16724197,
and rdar://problem/45889192.

Copy link
Member

@DougGregor DougGregor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@slavapestov slavapestov force-pushed the member-type-shadowing-rule branch from d3ca83b to c30dec3 Compare September 26, 2019 01:52
…th same name

The existing rules sometimes behaved this way, because validateDecl()
bails out silently without error on circularity.

Let's make this explicit instead, and get it working in all cases.

Fixes <rdar://https://bugs.swift.org/browse/SR-3492> and
<rdar://problem/45889192>.
…ogic

There's no need to roll our own implementation here.

Fixes <rdar://problem/16724197>.
@slavapestov slavapestov force-pushed the member-type-shadowing-rule branch from c30dec3 to 44827bb Compare September 26, 2019 02:18
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov
Copy link
Contributor Author

@swift-ci Please test source compatibility

@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test macOS

@slavapestov
Copy link
Contributor Author

@swift-ci Please test source compatibility Release

@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test macOS

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.

2 participants