Skip to content

Do not use declared constant's value inside a nameof() expression - #503

Merged
gafter merged 1 commit into
dotnet:masterfrom
gafter:fix40
Feb 16, 2015
Merged

Do not use declared constant's value inside a nameof() expression#503
gafter merged 1 commit into
dotnet:masterfrom
gafter:fix40

Conversation

@gafter

@gafter gafter commented Feb 14, 2015

Copy link
Copy Markdown
Member

Fixes #40

@gafter

gafter commented Feb 14, 2015

Copy link
Copy Markdown
Member Author

I also changed all of the tabs in SourceLocalSymbol to spaces.

@gafter

gafter commented Feb 14, 2015

Copy link
Copy Markdown
Member Author

@VladimirReshetnikov @VSadov Can you please review this?

@gafter gafter self-assigned this Feb 14, 2015
@gafter gafter added Area-Compilers 4 - In Review A fix for the issue is submitted for review. labels Feb 14, 2015
@gafter gafter added this to the 1.0-rc2 milestone Feb 14, 2015
@gafter

gafter commented Feb 14, 2015

Copy link
Copy Markdown
Member Author

@Jenkins test this please

@gafter

gafter commented Feb 14, 2015

Copy link
Copy Markdown
Member Author

To: @AlekseyTs @agocke @VSadov @VladimirReshetnikov @jaredpar

Can a couple of you please take a look?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Meaning "there is no enclosing nameof expression"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Consider adding this as a comment

@agocke

agocke commented Feb 16, 2015

Copy link
Copy Markdown
Member

Does this need a test in the semantic model?

@gafter

gafter commented Feb 16, 2015

Copy link
Copy Markdown
Member Author

@agocke What would you like to see tested? Or do you mean the semantic model may need to be adjusted to accomodate the change?

@agocke

agocke commented Feb 16, 2015

Copy link
Copy Markdown
Member

@gafter Just that the semantic model also successfully binds without diagnostics.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please add similar test for VB.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Doing so under #543.

@AlekseyTs

Copy link
Copy Markdown
Contributor

LGTM. We should have the same test for VB.

gafter added a commit that referenced this pull request Feb 16, 2015
Do not use declared constant's value inside a nameof() expression
@gafter
gafter merged commit 08c5fbf into dotnet:master Feb 16, 2015
@gafter
gafter deleted the fix40 branch February 16, 2015 20:01
@gafter gafter removed the 4 - In Review A fix for the issue is submitted for review. label Feb 16, 2015
dibarbet pushed a commit that referenced this pull request Aug 18, 2026
Update CreateTestFile to work with new APIs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to compile constant declaration with self-referencing nameof expression

4 participants