Skip to content
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

Issue 15366 - Enum typed as bool behaves as bool even when cast #5279

Merged
merged 1 commit into from
Nov 21, 2015

Conversation

9rnsr
Copy link
Contributor

@9rnsr 9rnsr commented Nov 21, 2015

https://issues.dlang.org/show_bug.cgi?id=15366

From a CastExp 'a && b', its semantic returns an AndAndExp with the 'Enum' type.
But if its semantic will be called once more, it will repaint its type to 'bool'.

Same problem exists in OrOrExp.

From a CastExp 'a && b', its `semantic` returns an `AndAndExp` with the 'Enum' type.
But if its `semantic` will be called once more, it will repaint its `type` to 'bool'.

Same problem exists in `OrOrExp`.
@dlang-bot
Copy link
Contributor

Fix Bugzilla Description
15366 Enum typed as bool behaves as bool even when cast

@lionello
Copy link
Contributor

Wow, nice! I was looking at it just now and indeed noticed that it got removed by semantic! Thanks @9rnsr !

@lionello
Copy link
Contributor

LGTM, by the way

@yebblies
Copy link
Member

Auto-merge toggled on

yebblies added a commit that referenced this pull request Nov 21, 2015
Issue 15366 - Enum typed as bool behaves as bool even when cast
@yebblies yebblies merged commit 913ffbe into dlang:master Nov 21, 2015
@9rnsr 9rnsr deleted the fix15366 branch November 21, 2015 16:46
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.

4 participants