Duplicate properties with the same name
Opened this issue · 3 comments
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.
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?
That should be a hard error IMO.
- henrik
27 sep 2013 kl. 17:23 skrev Federico Tomassetti notifications@github.com:
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.
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