-
Notifications
You must be signed in to change notification settings - Fork 26
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
Add trait support and its test. #188
Conversation
I would like the following code to compile
but the following code to fail
The problem with the second example is that the trait |
There is a regression in the quality of general error messages. Some examples:
Now:
(note misspelled "methad" in first example) The middle one might not count as a regression, but that these error messages have changed at all makes me a bit worried that there are changes in this PR that changes other things than adding trait support. |
Not very clear about the two snippets you posted above. It seems typechecking error to me. Added a commit to see if I understand it correctly. As for the error msg, some "refactoring" is done to accommodate traits, and it's likely that some visible effects are leaked out. Would address them in later commits. |
Another name clash bug: There needs to be a check for traits and classes with the same name (otherwise there's an error from clang). |
We've had this discussion before, but I don't like that there are some changes that do not follow the naming conventions of the file they're in. Mostly it's a question of camelCase vs. snake_case but not always. For example, in |
A lot of nice refactorings in this commit, and the traits seem to be working like they should (at least as long as you use them like you're supposed to)! Will keep this conversation going as new commits are added. Let me know if you want me to fix something! |
It's a bit late now, but our own guidelines actually says we should develop larger features in a feature branch, not directly in master. Let's remember this for the next larger addition to the language. Also, see the section on respecting conventions ;) |
If the |
Add trait support and its test.
No description provided.