nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f80517c
)
src: Add arity check on INative constructor
author
Alexandre Terrasa
<alexandre@moz-concept.com>
Thu, 14 Apr 2011 21:26:12 +0000
(17:26 -0400)
committer
Alexandre Terrasa
<alexandre@moz-concept.com>
Thu, 14 Apr 2011 21:26:12 +0000
(17:26 -0400)
Signed-off-by: Alexandre Terrasa <alexandre@moz-concept.com>
src/icode/icode_base.nit
patch
|
blob
|
history
diff --git
a/src/icode/icode_base.nit
b/src/icode/icode_base.nit
index
09c966b
..
5ceb1cb
100644
(file)
--- a/
src/icode/icode_base.nit
+++ b/
src/icode/icode_base.nit
@@
-332,7
+332,10
@@
class INative
init(m: MMMethod, e: nullable Sequence[IRegister])
do
- super(e)
+ # Checks that arguments contains at least one IRegister element
+ assert e.length == m.signature.arity + 1
+
+ super(e)
_method = m
end