Skip to content

Disallow statements between overloads #317

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

Merged
merged 2 commits into from
Jul 31, 2014
Merged

Disallow statements between overloads #317

merged 2 commits into from
Jul 31, 2014

Conversation

vladima
Copy link
Contributor

@vladima vladima commented Jul 30, 2014

Ensure that overloads are consecutive when checking functions.
this fixes #75 and #92

"category": "Error",
"code": 2239
},
"Constructor implementation is missing.": {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This error message was changed from "Constructor implementation expected." to "Constructor implementation is missing.". Given that error is usually reported on the line that contains the last overload wording "Constructor implementation expected." is not clear enough to explain what went wrong (should I create implementation instead of this overloads? But what if I need this overloads? etc...). In opposite "Constructor implementation is missing." implies that this overload itself is ok but it lacks implementation and thus error is reported

Copy link
Contributor

Choose a reason for hiding this comment

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

Seems too generic, the problem may not be a missing implementation per se but an implementation that is separated from the declaration.. so something like "Function implementation is missing or not immediately following the declaration", or "Function implementation is expected to follow the declaration" .. etc..

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, makes sense. I'll change it to "Function implementation is missing or not immediately following the declaration"

@mhegazy
Copy link
Contributor

mhegazy commented Jul 31, 2014

👍

vladima added a commit that referenced this pull request Jul 31, 2014
Disallow statements between overloads
fixed #75 and #92
@vladima vladima merged commit ed26563 into master Jul 31, 2014
@vladima vladima deleted the order_of_overloads branch August 3, 2014 05:40
@microsoft microsoft locked and limited conversation to collaborators Jun 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Errors] function overload with statements before its implementation
3 participants