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

[gbc] gbc should reject methods with same name #388

Closed
wants to merge 2 commits into from

Conversation

lalo
Copy link
Member

@lalo lalo commented Mar 30, 2017

- add test
- functions and events should have unique names
- fixes microsoft#381
@@ -0,0 +1,12 @@
namespace tests
Copy link
Member

Choose a reason for hiding this comment

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

Minor: consider naming this file duplicate_service_method.bond

where
findDuplicatesBy accessor xs = deleteFirstsBy ((==) `on` accessor) xs (nubBy ((==) `on` accessor) xs)

findDuplicatesBy :: (Eq b) => (a -> b) -> [a] -> [a]
Copy link
Member

Choose a reason for hiding this comment

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

Minor: this feels like an odd place in the file for such a helper method. Move to near beginning/end?

CHANGELOG.md Outdated
@@ -32,6 +32,7 @@ different versioning scheme, following the Haskell community's
reader/writer protocols without having to explicitly compute the full
cross product.
* Add gbc flags to pick which C# files to generate (structs, gRPC, and comm).
* gbc ensures that method names are unique [Issue #381](https://github.com/Microsoft/bond/issues/381)
Copy link
Member

Choose a reason for hiding this comment

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

Minor: "...name are unique with a service."?

Copy link
Member Author

Choose a reason for hiding this comment

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

within?

CHANGELOG.md Outdated
@@ -32,7 +32,7 @@ different versioning scheme, following the Haskell community's
reader/writer protocols without having to explicitly compute the full
cross product.
* Add gbc flags to pick which C# files to generate (structs, gRPC, and comm).
* gbc ensures that method names are unique [Issue #381](https://github.com/Microsoft/bond/issues/381)
* gbc ensures that method names are unique within a service [Issue #381](https://github.com/Microsoft/bond/issues/381).
Copy link
Member

Choose a reason for hiding this comment

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

Minor: period before issue link

And yes, I meant "within"

@chwarr chwarr closed this in 3865e65 Mar 31, 2017
fuzhouch pushed a commit to fuzhouch/bond that referenced this pull request Apr 9, 2017
- Functions and events should have unique names
- Add test
- Fixes microsoft#381
- Closes microsoft#388
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.

gbc should reject methods with the same name
3 participants