nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2b7cab7
)
model: implements `MParameter#to_s`
author
Jean Privat
<jean@pryen.org>
Tue, 13 May 2014 09:31:09 +0000
(
05:31
-0400)
committer
Jean Privat
<jean@pryen.org>
Tue, 13 May 2014 10:08:43 +0000
(06:08 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>
src/model/model.nit
patch
|
blob
|
history
diff --git
a/src/model/model.nit
b/src/model/model.nit
index
d737d4b
..
dbbec6d
100644
(file)
--- a/
src/model/model.nit
+++ b/
src/model/model.nit
@@
-1472,6
+1472,15
@@
class MParameter
# Is the parameter a vararg?
var is_vararg: Bool
+ redef fun to_s
+ do
+ if is_vararg then
+ return "{name}: {mtype}..."
+ else
+ return "{name}: {mtype}"
+ end
+ end
+
fun resolve_for(mtype: MType, anchor: nullable MClassType, mmodule: MModule, cleanup_virtual: Bool): MParameter
do
if not self.mtype.need_anchor then return self