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

Duplicate properties with the same name #9

Open
ftomassetti opened this issue Sep 23, 2013 · 3 comments
Open

Duplicate properties with the same name #9

ftomassetti opened this issue Sep 23, 2013 · 3 comments

Comments

@ftomassetti
Copy link

Hi,
I had a problem with my code because a Metaclass was defining a reference named "value" while inheriting another reference with the same name.

I would suggest to issue a warning in such cases, the behavior is a bit confusing in my opinion.

@ftomassetti
Copy link
Author

If you have two references with the same name 'xyz' (one inherited, the other one not) what happens when you call the method xyz on the object? Do you get the value of which one?

@hlindberg
Copy link

That should be a hard error IMO.

  • henrik

27 sep 2013 kl. 17:23 skrev Federico Tomassetti [email protected]:

If you have two references with the same name 'xyz' (one inherited, the other one not) what happens when you call the method xyz on the object? Do you get the value of which one?


Reply to this email directly or view it on GitHub.

@ftomassetti
Copy link
Author

Also if they are not inherited no issues are reported, I just tried with:

class A < RGen::MetamodelBuilder::MMBase
     has_attr 'a',String
     has_attr 'a',String
end

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

No branches or pull requests

2 participants