JuliaLang/julia — Issue #227: general expression l-values should fail gracefully
Author: StefanKarpinski
Created: 2011-10-17 15:49:57+00:00
State: open
Labels: bugs

```
julia> -NaN = 1

julia> -1 = 1
(unbound-error lst)
unexpected error: #0 (arg-type 1)
#1 (llist-types (1))
#2 (generic-function-def-expr/lambda
(1))
#3 (apply-patterns (#fn(":000r1e0c1|c2c344;" [plambda-expansion (function (call
name . argl)
body) #fn(":000r4e0}_g2g344;" [generic-function-def-expr])
(__ name argl body)])
#fn(":000r1e0c1|c2c344;" [plambda-expansion (function (tuple . args)
body) #fn("9000r3c0c1c2}31Kg2L3;" [-> tuple #fn(copy-list)])
(__ args body)]))
(function (call - 1) 1))
#4 (apply-patterns/lambda
(#fn(":000r1e0c1|c2c344;" [plambda-expansion (function (call (curly name . sparams) . argl)
body)
#fn(":000r5e0}g2g3g444;" [generic-function-def-expr])
(__ name sparams argl body)])
#fn(":000r1e0c1|c2c344;" [plambda-expansion (function (call name . argl) body)
#fn(":000r4e0}_g2g344;" [generic-function-def-expr])
(__ name argl body)])
#fn(":000r1e0c1|c2c344;" [plambda-expansion (function (tuple . args) body)
#fn("9000r3c0c1c2}31Kg2L3;" [-> tuple #fn(copy-list)])
(__ args body)])))

julia> 1 + 2 = 3
(unbound-error lst)
unexpected error: #0 (arg-type 1)
#1 (llist-types (1 2))
#2 (generic-function-def-expr/lambda
(1 2))
#3 (apply-patterns (#fn(":000r1e0c1|c2c344;" [plambda-expansion (function (call
name . argl)
body) #fn(":000r4e0}_g2g344;" [generic-function-def-expr])
(__ name argl body)])
#fn(":000r1e0c1|c2c344;" [plambda-expansion (function (tuple . args)
body) #fn("9000r3c0c1c2}31Kg2L3;" [-> tuple #fn(copy-list)])
(__ args body)]))
(function (call + 1 2) 3))
#4 (apply-patterns/lambda
(#fn(":000r1e0c1|c2c344;" [plambda-expansion (function (call (curly name . sparams) . argl)
body)
#fn(":000r5e0}g2g3g444;" [generic-function-def-expr])
(__ name sparams argl body)])
#fn(":000r1e0c1|c2c344;" [plambda-expansion (function (call name . argl) body)
#fn(":000r4e0}_g2g344;" [generic-function-def-expr])
(__ name argl body)])
#fn(":000r1e0c1|c2c344;" [plambda-expansion (function (tuple . args) body)
#fn("9000r3c0c1c2}31Kg2L3;" [-> tuple #fn(copy-list)])
(__ args body)])))
```