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

In ModelicaCompliance.Operators.Overloading.ConstructorPriority, the call to the default constructor would be invalid anyway. #64

Open
qlambert-pro opened this issue Jan 7, 2019 · 0 comments

Comments

@qlambert-pro
Copy link
Contributor

This test verifies that the overloaded constructor shadows the automatically generated constructor.
The call to the constructor uses a single positional argument. This makes the potential call to the default constructor invalid. Therefore, the ambiguity is lifted by there being a single valid constructor.

I suggest we move the default binding from re to im:

Integer re;
Integer im = 1;

instead of:

Integer re = 1;
Integer im;

In this case, both calls are valid, and we test that the overloaded constructor properly shadows the automatically generated one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants