Skip to content

SILGen: Fix corner-case in emission of extension initializer #7441

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

Conversation

slavapestov
Copy link
Contributor

If the initializer is in a different file than the original
type, and the original type contains a stored property that
has both an initializer and a declared type, then the
initializer expression will not have been type checked.

So we must look at the type of pattern, which should still
be correct.

Fixes https://bugs.swift.org/browse/SR-3942 and
rdar://problem/25705157.

@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

If the initializer is in a different file than the original
type, and the original type contains a stored property that
has both an initializer *and* a declared type, then the
initializer expression will not have been type checked.

So we must look at the type of pattern, which should still
be correct.

Fixes <https://bugs.swift.org/browse/SR-3942> and
<rdar://problem/25705157>.
@slavapestov slavapestov force-pushed the fix-silgen-extension-initializer branch from 4e93834 to 2fac864 Compare February 14, 2017 00:29
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

1 similar comment
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov slavapestov merged commit c5b74af into swiftlang:master Feb 14, 2017
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.

1 participant