nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
41fd07e
)
scope: refuse `&x` where x is a local variable
author
Jean Privat
<jean@pryen.org>
Tue, 9 Jul 2019 15:10:23 +0000
(11:10 -0400)
committer
Jean Privat
<jean@pryen.org>
Tue, 13 Aug 2019 15:02:28 +0000
(11:02 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>
src/semantize/scope.nit
patch
|
blob
|
history
diff --git
a/src/semantize/scope.nit
b/src/semantize/scope.nit
index
3374951
..
2f8a1bf
100644
(file)
--- a/
src/semantize/scope.nit
+++ b/
src/semantize/scope.nit
@@
-482,7
+482,7
@@
redef class ACallFormExpr
var variable = v.search_variable(name)
if variable != null then
var n: AExpr
- if not n_args.n_exprs.is_empty or n_args isa AParExprs then
+ if not n_args.n_exprs.is_empty or n_args isa AParExprs or self isa ACallrefExpr then
v.error(self, "Error: `{name}` is a variable, not a method.")
return
end