X-Git-Url: http://nitlanguage.org diff --git a/src/metamodel/static_type.nit b/src/metamodel/static_type.nit index 7ebfaab..e3abaf0 100644 --- a/src/metamodel/static_type.nit +++ b/src/metamodel/static_type.nit @@ -76,6 +76,8 @@ class MMParam _mmtype = t _name = n end + + redef fun to_s do return "{name}: {mmtype}" end # Signature for local properties @@ -148,12 +150,10 @@ class MMSignature var tmp: String var a = new Array[String].with_capacity(_params.length) for i in [0.._params.length[ do - #var pn = _params_name[i] var p = _params[i] - #a.add("{pn}: {p}") a.add(p.to_s) end - s.append("({a.join(",")})") + s.append("({a.join(", ")})") end var rt = _return_type if rt != null then s.append(": {rt}") @@ -362,9 +362,9 @@ abstract class MMType # 'c' Must be a super-class of self # Example: # class A[E] - # class B[F] special A[F] - # class C[G] special B[String] - # class D special C[Float] + # class B[F] super A[F] + # class C[G] super B[String] + # class D super C[Float] # 'A[Int]'.upcast_for('A') -> 'A[Int]' # 'A[Int]'.upcast_for('B') -> abort # 'B[Int]'.upcast_for('B') -> 'B[Int]'