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

Fixing #461 - warning with a reference to non existing location in source file #1852

Merged
merged 7 commits into from
Dec 14, 2016

Conversation

forki
Copy link
Contributor

@forki forki commented Nov 26, 2016

No description provided.

@forki forki changed the title WIP Try to reproduce #461 Fixes #461 Nov 26, 2016
@forki forki changed the title Fixes #461 WIP Try to fix #461 Nov 26, 2016
@forki forki changed the title WIP Try to fix #461 Fixing #461 Nov 26, 2016
@forki
Copy link
Contributor Author

forki commented Nov 26, 2016

ready for review

@dsyme dsyme changed the title Fixing #461 Fixing #461 - warning with a reference to non existing location in source file Nov 26, 2016
@@ -2,7 +2,7 @@
// Empty program entry point warning
// Lack of entry point produces warning with correct source location when compiled to *.exe
// when source file declares type inside namespace
//<Expects id="FS0988" span="(1,81-1,81)" status="warning">Main module of program is empty: nothing will happen when it is run</Expects>
//<Expects id="FS0988" span="(10,18-10,18)" status="warning">Main module of program is empty: nothing will happen when it is run</Expects>
Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed we shouldn't report a non-existent location, but we need to report this on some actual source text, not a single character

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it always only used the m.EndRange for the error

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

I see. I guess a real single character is better than a non-existent single character :)

It would be better to give the error at a more real textual range but that is indeed further work

@forki
Copy link
Contributor Author

forki commented Nov 28, 2016

ready for review

@KevinRansom
Copy link
Member

@dotnet-bot test this please

@KevinRansom
Copy link
Member

@forki

Thanks for taking care of this

Kevin

@KevinRansom KevinRansom merged commit 3925d98 into dotnet:master Dec 14, 2016
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