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

Do not permit a nullable reference type for an is operator #32025

Closed
gafter opened this issue Dec 26, 2018 · 1 comment
Closed

Do not permit a nullable reference type for an is operator #32025

gafter opened this issue Dec 26, 2018 · 1 comment

Comments

@gafter
Copy link
Member

gafter commented Dec 26, 2018

The is-type operator returns false when the left operand is null, for example in e is string?. It should therefore be a semantic error when the type given is a nullable reference type, as in this example. We already make that an error for the is-pattern operator, for example in e is string? s.

@gafter gafter added this to the 16.0.P2 milestone Dec 26, 2018
@gafter gafter added this to Working/In Review in Compiler: Gafter Dec 29, 2018
@gafter gafter self-assigned this Dec 29, 2018
@gafter gafter moved this from Next Up to Working/In Review in Compiler: Pattern-Matching Dec 29, 2018
@gafter gafter moved this from Working/In Review to Next Up in Compiler: Pattern-Matching Jan 3, 2019
@gafter gafter removed this from Working/In Review in Compiler: Gafter Jan 4, 2019
@gafter gafter moved this from Next Up to Working/In Review in Compiler: Pattern-Matching Jan 8, 2019
@gafter gafter removed this from Working/In Review in Compiler: Pattern-Matching Jan 8, 2019
@gafter gafter added this to Working/In Review in Compiler: Gafter Jan 8, 2019
gafter added a commit to gafter/roslyn that referenced this issue Jan 16, 2019
…d into semantic analysis

- Move error checking for invalid array dimensions out of the parser and into semantic analysis
- Diagnose `e is string?`
Fixes dotnet#32025
@gafter gafter modified the milestones: 16.0.P2, 16.0.P3 Jan 16, 2019
@gafter gafter modified the milestones: 16.0.P3, 16.0.P4 Jan 25, 2019
@gafter
Copy link
Member Author

gafter commented Jan 25, 2019

Fixed in #32431.

@gafter gafter closed this as completed Jan 25, 2019
@gafter gafter removed this from Working/In Review in Compiler: Gafter Jan 25, 2019
xoofx pushed a commit to stark-lang/stark-roslyn that referenced this issue Apr 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant