nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8e217fd
)
niti: clean AAttrPropdef#call
author
Jean Privat
<jean@pryen.org>
Mon, 21 Jul 2014 20:03:52 +0000
(16:03 -0400)
committer
Jean Privat
<jean@pryen.org>
Tue, 22 Jul 2014 11:58:09 +0000
(07:58 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>
src/naive_interpreter.nit
patch
|
blob
|
history
diff --git
a/src/naive_interpreter.nit
b/src/naive_interpreter.nit
index
ba2fb39
..
99dd950
100644
(file)
--- a/
src/naive_interpreter.nit
+++ b/
src/naive_interpreter.nit
@@
-982,12
+982,15
@@
redef class AAttrPropdef
var recv = args.first
assert recv isa MutableInstance
var attr = self.mpropdef.mproperty
- if args.length == 1 then
+ if mpropdef == mreadpropdef then
+ assert args.length == 1
return v.read_attribute(attr, recv)
- else
+ else if mpropdef == mwritepropdef then
assert args.length == 2
v.write_attribute(attr, recv, args[1])
return null
+ else
+ abort
end
end