-
-
Notifications
You must be signed in to change notification settings - Fork 108
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
Redefining an imported type is allowed #871
Comments
you can modify it better as short and precise. concept files { |
please assign this issue to me |
@yashsaraswat2004 It is great so see your motivation towards contributing to this issue and concerto in general . Currently we (Internally) are working on closing this issue already so i would suggest you to pickup some different issue. I suggest you to join Accord discord channel and explore concerto more. |
Thanks both. I agree this would be a good issue to fix. Note that we recently added support for import aliasing which is useful for name conflicts. |
What is the status of this please? |
Bug Report 🐛
When I try to redefine an imported type in the file, it should throw an error as there should be a name conflict.
For example, below code :
Here, I am trying to redefine the concept doc imported above. Should this be allowed?
Expected Behavior
It should throw an error stating the name conflict. As mentioned above, local type doc has two definitions, i.e.
[email protected]
and[email protected]
Current Behavior
The code gets compiled successfully. Inside the
concept files
, the typedoc
gets resolved to[email protected]
, which is from the import statement.Possible Solution
In
concerto/core
inside the model file validation, we test if the declaration has unique names or not. We don't check with the imported types there. Just checking there with the imports could fix this issue.Check the validation code here.
concerto/packages/concerto-core/lib/introspect/modelfile.js
Line 276 in 9e61044
The text was updated successfully, but these errors were encountered: