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

Compiler gives no warning for redundant definitions, and obscures errors in earlier definitions #1101

Open
edwardpeters opened this issue Sep 7, 2023 · 0 comments
Labels
task Task level project item

Comments

@edwardpeters
Copy link

edwardpeters commented Sep 7, 2023

Describe the bug
If two definitions by the same name are given in the same module, the compiler gives no errors or warnings; additionally, any errors in the earlier definition are not shown.

To Reproduce
Compile the following file:

module Scratch.ExampleModule exposing (..)

typeErrorTest : Bool -> String
typeErrorTest x = True
     
typeErrorTest : Bool -> Bool
typeErrorTest x = x

With both make and make -f, this successfully compiles with no warnings given.

Expected behavior
An error should be given for the conflicting definitions, and errors from example functions should not be hidden.

Desktop (please complete the following information):

  • OS: [e.g. iOS] : OSX
  • Browser: Unused
  • Version: 2.89.0

Additional context
This has a negative impact on developer experience, as we get very confusing behavior where a function appears to be compiling but neither its errors nor runtime behavior are actually apparent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
task Task level project item
Projects
None yet
Development

No branches or pull requests

1 participant