Skip to content

Handle Boolean literals as enum raw values. #28274

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
Nov 15, 2019

Conversation

DougGregor
Copy link
Member

Fixes rdar://problem/55384273.

@DougGregor DougGregor requested a review from CodaFi November 14, 2019 23:01
@DougGregor
Copy link
Member Author

@swift-ci please smoke test

@CodaFi
Copy link
Contributor

CodaFi commented Nov 14, 2019

Is the depth map stuff supposed to be attached?

@DougGregor
Copy link
Member Author

Is the depth map stuff supposed to be attached?

I got lazy, sorry; it's also in the more purposeful #28276

}

// expected-error@+1{{'IsRecursive' declares raw type 'Bool', but does not conform to RawRepresentable and conformance could not be synthesized}}
enum IsRecursive : Bool, Equatable, Hashable {
Copy link
Contributor

Choose a reason for hiding this comment

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

Some more tests: an @objc enum (and if we allow this, an IRGen test), an enum with an invalid raw value expression.

Copy link
Member Author

Choose a reason for hiding this comment

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

@objc enums are banned; I've added more tests

@DougGregor
Copy link
Member Author

@swift-ci please smoke test and merge

3 similar comments
@DougGregor
Copy link
Member Author

@swift-ci please smoke test and merge

@DougGregor
Copy link
Member Author

@swift-ci please smoke test and merge

@DougGregor
Copy link
Member Author

@swift-ci please smoke test and merge

@swift-ci swift-ci merged commit 0540535 into swiftlang:master Nov 15, 2019
@DougGregor DougGregor deleted the bool-raw-value branch November 15, 2019 06:41
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