morphir-elm icon indicating copy to clipboard operation
morphir-elm copied to clipboard

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

Open edwardpeters opened this issue 1 year ago • 0 comments

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.

edwardpeters avatar Sep 07 '23 15:09 edwardpeters