-
Notifications
You must be signed in to change notification settings - Fork 660
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
Detect repeat argument names at compile time #809
Comments
This has bit me multiple times! Also happens when declaring a local variable with the same name as an argument: update action model =
let result =
(model, effects)
(updatedSubmodel, effects) =
Subcomponent.update action model.submodel
model = -- should be updatedModel
{ model | submodel <- updatedSubmodel }
in result |
Are the previous two comments really placed correctly in this issue here? Don't they belong to #829 / #1018 instead? Look at the opening comment of this issue. It is about a very specific situation that is not what you (@thSoft and @Apanatshka) are talking about here. |
Sorry, you're right, @jvoigtlaender. Should I delete my comment? |
As for the original issue, I remember seeing something similar. Can someone please verify that the issue exists in the 0.16 alpha? |
It still exists in 0.16-alpha3. In the repl:
|
Also the following code
does not produce an error. Instead, mySum is equal to 5. |
Yes, there is no sensible way to interpret that definition. |
The following code
Generates the error
Which is good, except that the error message appears only in the console. Instead, the webpage only shows
Which makes debugging really confusing.
The text was updated successfully, but these errors were encountered: