Skip to content

[PrintAsObjC] Handle generic typealiases #18941

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 1 commit into from
Aug 24, 2018

Conversation

jrose-apple
Copy link
Contributor

(either explicitly generic ones, or those embedded in generic contexts)

Previously we tried to look at the typealias decl's underlying type, but that might have generic parameters in it. Oops. Use the NameAliasType's desugared type instead.

Also, drop half-baked support for @objc typealias, which isn't supported. (It's not an unreasonable feature, but the bits that were there weren't implemented correctly.)

rdar://problem/43347303

@jrose-apple
Copy link
Contributor Author

@swift-ci Please test

@jrose-apple
Copy link
Contributor Author

@swift-ci Please test source compatibility

@jrose-apple
Copy link
Contributor Author

I'm suspicious now of all the other places that are using getUnderlyingTypeLoc().getType() instead of getSinglyDesugaredType() but they all seem to be dealing with actual TypeAliasDecls, extended types, or the importer's "compatibility typealiases". The last might actually be an issue but I can't think how to trip it.

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - f04a3ce3134b091e6b32c4f6c31d200b6d820408

@jrose-apple jrose-apple force-pushed the the-underlying-problem branch from f04a3ce to a7b507a Compare August 24, 2018 02:28
(either explicitly generic ones, or those embedded in generic contexts)

Previously we tried to look at the typealias decl's underlying type,
but that might have generic parameters in it. Oops. Use the
NameAliasType's desugared type instead.

Also, drop half-baked support for `@objc typealias`, which isn't
supported. (It's not an unreasonable feature, but the bits that were
there weren't implemented correctly.)

rdar://problem/43347303
@jrose-apple
Copy link
Contributor Author

macOS full test
Source compat test

@swift-ci Please smoke 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.

3 participants