Skip to content
This repository has been archived by the owner on Aug 23, 2018. It is now read-only.

Unexpected variable assignment (by reference rather than value) #133

Open
designrubenz opened this issue Oct 24, 2016 · 1 comment
Open

Comments

@designrubenz
Copy link

designrubenz commented Oct 24, 2016

elm-repl 0.17.1

> a = [3,2,1]
[3,2,1] : List number
> b = 4 :: a
[4,3,2,1] : List number
> a = [1]
[1] : List number
> b
[4,1] : List number

I would expect b to stay unchanged ( [4,3,2,1] ) when a changes.

Also I would like to suggest a little warning message that reassigning the same variable is possible in the REPL (as a convenience) but is not supported in an Elm application.

@process-bot
Copy link

Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!

Here is what to expect next, and if anyone wants to comment, keep these things in mind.

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

No branches or pull requests

2 participants