Closed neocris closed 8 years ago
Seems like it works fine to me. Here's the http://sscce.org/
import Html exposing (..)
main =
text <| toString <| myobj.prop_func 42
myobj = {
some_func = (\str -> str),
prop_func = (\_ -> myobj.some_func "somestring")
}
Prints out "somestring"
. If you can produce an http://sscce.org that has the problem you describe, and it is not a duplicate of https://github.com/elm-lang/elm-compiler/issues/873 you should open a new issue at https://github.com/elm-lang/elm-compiler/issues
look at this perfectly viable elm code:
however when compiling this to js it returns an error because on js this kind of object recursivity is not allowed so the reference to
myobj
inprop_func
is undefined, so should the elm compiler produce something that will be rejected at runtime by the target language?