Skip to content

Conversation

@forki
Copy link
Contributor

@forki forki commented May 9, 2016

fixes #1162

image

@forki forki force-pushed the last-let branch 3 times, most recently from 1e1d6ff to 27c2921 Compare May 9, 2016 11:53
@forki forki changed the title Improve error reporting: Let as last line in block WIP: Improve error reporting: Let as last line in block May 9, 2016
@forki forki force-pushed the last-let branch 2 times, most recently from aee7847 to 412c291 Compare May 9, 2016 13:12
@dsyme
Copy link
Contributor

dsyme commented May 9, 2016

Per other error message discussions, please follow the "Error. Explanation. Suggestion" format.

(e.g. Try reading your error message interpreting the first sentence as a description of an error - i.e. a negative - rather than the positive explanation you intend).

@dsyme
Copy link
Contributor

dsyme commented May 9, 2016

Oh, also be careful of using the word return. That will be misinterpreted to mean a C-like return, e.g. return 3.

Together those two observations would give something like:

The block following this '%s' is unfinished. Every code block is an expression and must have a result. '%s' cannot be the final code element in a block. Consider giving this block an explicit result.

@forki forki force-pushed the last-let branch 5 times, most recently from 6f671ef to ea3e6bd Compare May 10, 2016 07:49
@forki forki changed the title WIP: Improve error reporting: Let as last line in block Improve error reporting: Let as last line in block May 10, 2016
@forki
Copy link
Contributor Author

forki commented May 10, 2016

Error message is changed to @dsyme's proposal. Appveyor is green. Jenkins is red because of unrelated issue (see #1169).

ready for review

@dsyme
Copy link
Contributor

dsyme commented May 11, 2016

@forki When you update the error message could you update the screen shot too? Or just remove it. Thanks

@dsyme
Copy link
Contributor

dsyme commented May 11, 2016

The code and new message look good to me, it's ready to go (as far as I can see :) )

@forki forki force-pushed the last-let branch 6 times, most recently from 00a117e to c5ece91 Compare May 13, 2016 05:56
@forki
Copy link
Contributor Author

forki commented May 13, 2016

something is strange with appveyor - @KevinRansom @otawfik-ms

@forki
Copy link
Contributor Author

forki commented May 17, 2016

it's green and ready

@KevinRansom KevinRansom merged commit 778c517 into dotnet:master May 17, 2016
@forki forki deleted the last-let branch May 18, 2016 11:45
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.

Improve error reporting: Let as last line in block

4 participants