Merge branch 'pu/parameter-names' into wip
authorJean Privat <jean@pryen.org>
Wed, 12 Oct 2011 20:34:13 +0000 (16:34 -0400)
committerJean Privat <jean@pryen.org>
Thu, 13 Oct 2011 00:21:59 +0000 (20:21 -0400)
Conflicts:
src/syntax/mmbuilder.nit
tests/sav/base_init_linext2_alt2.sav
tests/sav/base_init_linext2_alt4.sav
tests/sav/base_for_custom_alt3.sav
tests/sav/base_for_custom_alt4.sav
tests/sav/test_parser_args1.sav
tests/sav/test_parser_args2.sav

34 files changed:
misc/gtksourceview/nit.lang
src/compiling/compiling_writer.nit
src/metamodel/static_type.nit
src/syntax/mmbuilder.nit
src/syntax/syntax_base.nit
src/syntax/typing.nit
tests/sav/base_closure1_alt2.sav
tests/sav/base_closure2_alt2.sav
tests/sav/base_closure3_alt1.sav
tests/sav/base_closure4_alt2.sav
tests/sav/base_closure_break2_alt2.sav
tests/sav/base_closure_break_alt2.sav
tests/sav/base_closure_raf_alt13.fail
tests/sav/base_closure_raf_alt2.fail
tests/sav/base_for_custom_alt3.sav
tests/sav/base_for_custom_alt4.sav
tests/sav/base_init_linext2_alt2.sav
tests/sav/base_init_linext2_alt4.sav
tests/sav/base_vararg_alt1.sav
tests/sav/base_vararg_alt2.sav
tests/sav/base_vararg_alt3.sav
tests/sav/base_vararg_alt4.sav
tests/sav/base_vararg_alt5.sav
tests/sav/base_vararg_alt6.sav
tests/sav/base_vararg_alt7.sav
tests/sav/base_vararg_alt8.sav
tests/sav/error_expr_not_ok_alt4.sav
tests/sav/error_expr_not_ok_alt5.sav
tests/sav/error_init_auto.sav
tests/sav/error_init_auto_alt1.sav
tests/sav/error_init_auto_alt2.sav
tests/sav/error_init_auto_alt3.sav
tests/sav/test_parser_args1.sav
tests/sav/test_parser_args2.sav

index eac19d0..31dad38 100644 (file)
@@ -71,7 +71,6 @@
       <keyword>fun</keyword>
       <keyword>redef</keyword>
       <keyword>var</keyword>
-      <keyword>package</keyword>
       <keyword>module</keyword>
       <keyword>type</keyword>
       <keyword>universal</keyword>
index d32211a..66ba50e 100644 (file)
@@ -97,7 +97,7 @@ class Writer
        # Return true if the string writer is frozen
        readable var _is_frozen: Bool = false
 
-       # Disable funter writer modification: nor add or append are allowed
+       # Disable further writer modification: nor add or append are allowed
        fun freeze
        do
                if is_frozen then return
index c44efb9..e3abaf0 100644 (file)
@@ -67,13 +67,26 @@ redef class MMLocalProperty
        end
 end
 
+class MMParam
+       readable var _mmtype: MMType
+       readable var _name: Symbol
+
+       init ( t  : MMType, n : Symbol )
+       do
+           _mmtype = t
+           _name = n
+       end
+
+       redef fun to_s do return "{name}: {mmtype}"
+end
+
 # Signature for local properties
 class MMSignature
        # The type of the reveiver
        readable var _recv: MMType
 
        # The parameter types
-       var _params: Array[MMType]
+       readable var _params: Array[MMParam]
 
        # The return type
        readable var _return_type: nullable MMType
@@ -127,7 +140,7 @@ class MMSignature
        fun [](i: Int): MMType
        do
                assert _params.length > i
-               return _params[i]
+               return _params[i].mmtype
        end
 
        redef fun to_s
@@ -137,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}")
@@ -156,9 +167,17 @@ class MMSignature
                        return self
                end
                var mod = r.mmmodule
-               var p = new Array[MMType]
+               var p = new Array[MMParam]
                for i in _params do
-                       p.add(i.for_module(mod).adapt_to(r))
+                       var new_type = i.mmtype.for_module(mod).adapt_to(r)
+                       var new_param
+                       if new_type == i.mmtype then
+                               new_param = i
+                       else
+                               new_param = new MMParam( new_type, i.name )
+                       end
+
+                       p.add( new_param )
                end
                var rv = _return_type
                if rv != null then
@@ -180,11 +199,18 @@ class MMSignature
                if _not_for_self_cache != null then return _not_for_self_cache.as(not null)
 
                var need_for_self = false
-               var p = new Array[MMType]
+               var p = new Array[MMParam]
                for i in _params do
-                       var i2 = i.not_for_self
-                       if i != i2 then need_for_self = true
-                       p.add(i2)
+                       var new_type = i.mmtype.not_for_self
+                       var new_param
+                       if i.mmtype == new_type then
+                               new_param = i
+                       else
+                               need_for_self = true
+                               new_param = new MMParam( new_type, i.name )
+                       end
+
+                       p.add( new_param )
                end
 
                var rv = _return_type
@@ -212,7 +238,7 @@ class MMSignature
                return res
        end
 
-       init(params: Array[MMType], return_type: nullable MMType, r: MMType)
+       init(params: Array[MMParam], return_type: nullable MMType, r: MMType)
        do
                _params = params
                _return_type = return_type
@@ -304,7 +330,7 @@ abstract class MMAncestor
 end
 
 # A static type
-# Note that static type a related to a specific module
+# Note that static type is related to a specific module
 abstract class MMType
        # The module where self makes sence
        fun mmmodule: MMModule is abstract
index 0c41698..6acc061 100644 (file)
@@ -292,17 +292,17 @@ redef class MMImplicitInit
                end
                _super_init = base
 
-               var params = new Array[MMType]
+               var params = new Array[MMParam]
                if base != null then
                        var sig = base.signature
                        for i in [0..sig.arity[ do
-                               params.add(sig[i])
+                               params.add(sig.params[i])
                        end
                end
                for a in unassigned_attributes do
                        var sig = a.signature
                        if sig == null then return # Broken attribute definition
-                       params.add(sig.return_type.as(not null))
+                       params.add( new MMParam( sig.return_type.as(not null), once "recv".to_symbol))
                end
                signature = new MMSignature(params, null, local_class.get_type)
        end
@@ -462,7 +462,7 @@ redef class AModuledecl
        redef fun accept_class_builder(v)
        do
                if n_id.to_symbol != v.mmmodule.name then
-                       v.error(n_id, "Error: Module name missmatch between {v.mmmodule.name} and {n_id.to_symbol}")
+                       v.error(n_id, "Error: Module name mismatch between {v.mmmodule.name} and {n_id.to_symbol}")
                end
        end
 end
@@ -658,6 +658,62 @@ redef class AStdClassdef
        do
                return n_formaldefs.length
        end
+       redef fun accept_class_verifier(v)
+       do
+               super
+               var glob = _local_class.global
+               if glob.intro == _local_class then
+                       # Intro
+                       glob.visibility_level = visibility_level
+                       glob.is_interface = n_classkind.is_interface
+                       glob.is_abstract = n_classkind.is_abstract
+                       glob.is_enum = n_classkind.is_enum
+                       if n_kwredef != null then
+                               v.error(self, "Redef error: No class {name} is imported. Remove the redef keyword to define a new class.")
+                       end
+
+                       for c in _local_class.cshe.direct_greaters do
+                               var cg = c.global
+                               if glob.is_interface then
+                                       if cg.is_enum then
+                                               v.error(self, "Special error: Interface {name} try to specialise enum class {c.name}.")
+                                       else if not cg.is_interface then
+                                               v.error(self, "Special error: Interface {name} try to specialise class {c.name}.")
+                                       end
+                               else if glob.is_enum then
+                                       if not cg.is_interface and not cg.is_enum then
+                                               v.error(self, "Special error: Enum class {name} try to specialise class {c.name}.")
+                                       end
+                               else
+                                       if cg.is_enum then
+                                               v.error(self, "Special error: Class {name} try to specialise enum class {c.name}.")
+                                       end
+                               end
+
+                       end
+                       return
+               end
+
+               # Redef
+
+               glob.check_visibility(v, self, v.mmmodule)
+               if n_kwredef == null then
+                       v.error(self, "Redef error: {name} is an imported class. Add the redef keyword to refine it.")
+                       return
+               end
+
+               if glob.intro.arity != _local_class.arity then
+                       v.error(self, "Redef error: Formal parameter arity mismatch; got {_local_class.arity}, expected {glob.intro.arity}.")
+               end
+
+               if 
+                       not glob.is_interface and n_classkind.is_interface or
+                       not glob.is_abstract and n_classkind.is_abstract or
+                       not glob.is_enum and n_classkind.is_enum
+               then
+                       v.error(self, "Redef error: cannot change kind of class {name}.")
+               end
+       end
 
        redef fun visibility_level
        do
@@ -802,7 +858,7 @@ redef class APropdef
                        else if not v.signature_builder.untyped_params.is_empty then
                                v.error(v.signature_builder.untyped_params.first, "Error: Untyped parameter.")
                        else
-                               prop.signature = new MMSignature(new Array[MMType], null, v.local_class.get_type)
+                               prop.signature = new MMSignature(new Array[MMParam], null, v.local_class.get_type)
                                for clos in v.signature_builder.closure_decls do
                                        prop.signature.closures.add(clos.variable.closure)
                                end
@@ -998,7 +1054,7 @@ redef class AAttrPropdef
                end
 
                var prop = prop
-               var signature = new MMSignature(new Array[MMType], t, v.local_class.get_type)
+               var signature = new MMSignature(new Array[MMParam], t, v.local_class.get_type)
                prop.signature = signature
                var visibility_level = n_visibility.level
                process_and_check(v, prop, n_id != null and n_kwredef != null, visibility_level)
@@ -1010,7 +1066,7 @@ redef class AAttrPropdef
                end
                if n_writable != null or n_id == null then
                        var m = _writemethod.as(not null)
-                       m.signature = new MMSignature(new Array[MMType].with_items(t), null, v.local_class.get_type)
+                       m.signature = new MMSignature(new Array[MMParam].with_items(new MMParam(t, once "value".to_symbol)), null, v.local_class.get_type)
                        var vl = visibility_level
                        if n_id == null then
                                if n_writable == null then vl = 3 else vl = n_writable.n_visibility.level # write accessor has a specific visibility
@@ -1093,7 +1149,7 @@ redef class AMainMethPropdef
        redef fun process_and_check(v, prop, has_redef, visibility_level)
        do
                prop.global.visibility_level = visibility_level
-               prop.signature = new MMSignature(new Array[MMType], null, v.local_class.get_type)
+               prop.signature = new MMSignature(new Array[MMParam], null, v.local_class.get_type)
                # Disable all checks for main
        end
 end
@@ -1129,7 +1185,7 @@ redef class ATypePropdef
        redef fun accept_property_verifier(v)
        do
                super
-               var signature = new MMSignature(new Array[MMType], n_type.get_stype(v), v.local_class.get_type)
+               var signature = new MMSignature(new Array[MMParam], n_type.get_stype(v), v.local_class.get_type)
                prop.signature = signature
                var visibility_level = n_visibility.level
                process_and_check(v, prop, n_kwredef != null, visibility_level)
@@ -1158,8 +1214,7 @@ private class MethidAccumulator
 end
 
 redef class AMethid
-       # Method name
-       readable var _name: nullable Symbol 
+       redef readable var _name: nullable Symbol
 
        redef fun accept_property_builder(v)
        do
@@ -1182,9 +1237,9 @@ redef class ASignature
                                return
                        end
                else if not v.signature_builder.params.is_empty or n_type != null then
-                       var pars = new Array[MMType]
+                       var pars = new Array[MMParam]
                        for p in v.signature_builder.params do
-                               pars.add(p.stype.as(not null))
+                               pars.add( new MMParam( p.stype.as(not null),  p.n_id.to_symbol ) )
                        end
                        var ret: nullable MMType = null
                        if n_type != null then
@@ -1272,14 +1327,14 @@ redef class AClosureDecl
                end
                var sig = v.signature_builder.signature
                if sig == null then
-                       sig = new MMSignature(new Array[MMType], null, v.local_class.get_type)
+                       sig = new MMSignature(new Array[MMParam], null, v.local_class.get_type)
                end
                if sig.return_type != null and n_kwbreak != null then
                        v.error(self, "Syntax Error: A break block cannot have a return value.")
                end
 
                # Add the finalizer to the closure signature
-               var finalize_sig = new MMSignature(new Array[MMType], null, v.mmmodule.type_any) # FIXME should be no receiver
+               var finalize_sig = new MMSignature(new Array[MMParam], null, v.mmmodule.type_any) # FIXME should be no receiver
                var finalizer_clos = new MMClosure(once ("break".to_symbol), finalize_sig, false, true)
                sig.closures.add(finalizer_clos)
 
index 127163d..ab3020e 100644 (file)
@@ -834,3 +834,8 @@ redef class AClosureDef
        # Automatic variables
        readable writable var _variables: nullable Array[AutoVariable]
 end
+
+redef class AMethid
+       # Name of method
+       fun name: nullable Symbol is abstract
+end
index 97a6e33..5795cb6 100644 (file)
@@ -1272,7 +1272,7 @@ redef class AAbsAbsSendExpr
                var raw_arity: Int
                if raw_args == null then raw_arity = 0 else raw_arity = raw_args.length
                if par_arity > raw_arity or (par_arity != raw_arity and par_vararg == -1) then
-                       v.error(self, "Error: arity missmatch; prototype is '{name}{psig}'.")
+                       v.error(self, "Error: arity mismatch; prototype is '{name}{psig}'.")
                        return false
                end
                var arg_idx = 0
index b5a1d3f..f0b16a5 100644 (file)
@@ -1 +1 @@
-alt/base_closure1_alt2.nit:25,3--7: Error: arity missmatch; prototype is 'bar'.
+alt/base_closure1_alt2.nit:25,3--7: Error: arity mismatch; prototype is 'bar'.
index cdd6e13..8062d4a 100644 (file)
@@ -1 +1 @@
-alt/base_closure2_alt2.nit:25,3--5: Error: arity missmatch; prototype is 'bar(Int)'.
+alt/base_closure2_alt2.nit:25,3--5: Error: arity mismatch; prototype is 'bar(i: Int)'.
index 7dce49a..fd9b06f 100644 (file)
@@ -1 +1 @@
-alt/base_closure3_alt1.nit:25,3--14: Error: arity missmatch; prototype is 'bar(Int,Int,A)'.
+alt/base_closure3_alt1.nit:25,3--14: Error: arity mismatch; prototype is 'bar(k: Int, l: Int, a: A)'.
index 94170d4..80b595c 100644 (file)
@@ -1 +1 @@
-alt/base_closure4_alt2.nit:25,3--7: Error: arity missmatch; prototype is 'bar: Int'.
+alt/base_closure4_alt2.nit:25,3--7: Error: arity mismatch; prototype is 'bar: Int'.
index 0dd5e58..61e93cd 100644 (file)
@@ -1 +1 @@
-alt/base_closure_break2_alt2.nit:26,17--21: Error: arity missmatch; prototype is 'bar'.
+alt/base_closure_break2_alt2.nit:26,17--21: Error: arity mismatch; prototype is 'bar'.
index 39c797e..e941919 100644 (file)
@@ -1 +1 @@
-alt/base_closure_break_alt2.nit:26,17--21: Error: arity missmatch; prototype is 'bar'.
+alt/base_closure_break_alt2.nit:26,17--21: Error: arity mismatch; prototype is 'bar'.
index 26c4634..7347132 100644 (file)
@@ -1 +1 @@
-alt/base_closure_raf_alt13.nit:27,3--8: Error: arity missmatch; prototype is 'bar'.
+alt/base_closure_raf_alt13.nit:27,3--8: Error: arity mismatch; prototype is 'bar'.
index 035b956..88a4932 100644 (file)
@@ -1 +1 @@
-alt/base_closure_raf_alt2.nit:29,3--5: Error: arity missmatch; prototype is 'bar(Int)'.
+alt/base_closure_raf_alt2.nit:29,3--5: Error: arity mismatch; prototype is 'bar(i: Int)'.
index d0f88f0..fcb5137 100644 (file)
@@ -1 +1 @@
-alt/base_for_custom_alt3.nit:38,1--39,9: Error: Expected 1 variable (Int), found 2.
+alt/base_for_custom_alt3.nit:38,1--39,9: Error: Expected 1 variable (i: Int), found 2.
index 59e3590..bb74cf2 100644 (file)
@@ -1 +1 @@
-alt/base_for_custom_alt4.nit:44,1--45,9: Error: Expected 2 variables (Int,Bool), found 1.
+alt/base_for_custom_alt4.nit:44,1--45,9: Error: Expected 2 variables (i: Int, j: Bool), found 1.
index 1c357fa..c7c14d4 100644 (file)
@@ -1 +1 @@
-alt/base_init_linext2_alt2.nit:99,2--5: Error: there is no available compatible constructor in B. Discarded candidates are base_init_linext2_alt2::B::initb, base_init_linext2_alt2::B::init_par, base_init_linext2_alt2::B::init_par2(Char).
+alt/base_init_linext2_alt2.nit:99,2--5: Error: there is no available compatible constructor in B. Discarded candidates are base_init_linext2_alt2::B::initb, base_init_linext2_alt2::B::init_par, base_init_linext2_alt2::B::init_par2(c: Char).
index 4b12903..d7cc7d5 100644 (file)
@@ -1,2 +1,2 @@
-alt/base_init_linext2_alt4.nit:99,2--5: Error: there is no available compatible constructor in B. Discarded candidates are base_init_linext2_alt4::B::initb, base_init_linext2_alt4::B::init_par, base_init_linext2_alt4::B::init_par2(Char).
+alt/base_init_linext2_alt4.nit:99,2--5: Error: there is no available compatible constructor in B. Discarded candidates are base_init_linext2_alt4::B::initb, base_init_linext2_alt4::B::init_par, base_init_linext2_alt4::B::init_par2(c: Char).
 alt/base_init_linext2_alt4.nit:105,3--7: Error: Constructor of B must be invoked before constructor of C
index cd16023..57003b6 100644 (file)
@@ -1 +1 @@
-alt/base_vararg_alt1.nit:51,1--3: Error: arity missmatch; prototype is 'foo(Char)'.
+alt/base_vararg_alt1.nit:51,1--3: Error: arity mismatch; prototype is 'foo(a: Char)'.
index e5b6952..3e3cfea 100644 (file)
@@ -1 +1 @@
-alt/base_vararg_alt2.nit:54,1--3: Error: arity missmatch; prototype is 'bar(Char,Char)'.
+alt/base_vararg_alt2.nit:54,1--3: Error: arity mismatch; prototype is 'bar(b: Char, a: Char)'.
index 847f95b..769fb6c 100644 (file)
@@ -1 +1 @@
-alt/base_vararg_alt3.nit:55,1--7: Error: arity missmatch; prototype is 'bar(Char,Char)'.
+alt/base_vararg_alt3.nit:55,1--7: Error: arity mismatch; prototype is 'bar(b: Char, a: Char)'.
index 19ae490..dd43957 100644 (file)
@@ -1 +1 @@
-alt/base_vararg_alt4.nit:58,1--3: Error: arity missmatch; prototype is 'baz(Char,Char)'.
+alt/base_vararg_alt4.nit:58,1--3: Error: arity mismatch; prototype is 'baz(a: Char, b: Char)'.
index ad539b9..aea970c 100644 (file)
@@ -1 +1 @@
-alt/base_vararg_alt5.nit:59,1--7: Error: arity missmatch; prototype is 'baz(Char,Char)'.
+alt/base_vararg_alt5.nit:59,1--7: Error: arity mismatch; prototype is 'baz(a: Char, b: Char)'.
index 7df8f14..9fcbecc 100644 (file)
@@ -1 +1 @@
-alt/base_vararg_alt6.nit:62,1--6: Error: arity missmatch; prototype is 'foobar(Char,Char,Char)'.
+alt/base_vararg_alt6.nit:62,1--6: Error: arity mismatch; prototype is 'foobar(b: Char, a: Char, c: Char)'.
index dd247e2..ea9f0ff 100644 (file)
@@ -1 +1 @@
-alt/base_vararg_alt7.nit:63,1--10: Error: arity missmatch; prototype is 'foobar(Char,Char,Char)'.
+alt/base_vararg_alt7.nit:63,1--10: Error: arity mismatch; prototype is 'foobar(b: Char, a: Char, c: Char)'.
index b10307c..75c3324 100644 (file)
@@ -1 +1 @@
-alt/base_vararg_alt8.nit:64,1--14: Error: arity missmatch; prototype is 'foobar(Char,Char,Char)'.
+alt/base_vararg_alt8.nit:64,1--14: Error: arity mismatch; prototype is 'foobar(b: Char, a: Char, c: Char)'.
index 99cd125..000f220 100644 (file)
@@ -10,7 +10,7 @@ alt/error_expr_not_ok_alt4.nit:43,1--8: Error: Method 'fail' doesn't exists in I
 alt/error_expr_not_ok_alt4.nit:45,7--10: Type error: expected A, got Object
 alt/error_expr_not_ok_alt4.nit:46,1--9: Error: Method 'fail' doesn't exists in Object.
 alt/error_expr_not_ok_alt4.nit:49,7--10: Type error: expected A, got Object
-alt/error_expr_not_ok_alt4.nit:50,1--10: Error: arity missmatch; prototype is 'trash(A)'.
+alt/error_expr_not_ok_alt4.nit:50,1--10: Error: arity mismatch; prototype is 'trash(x: A)'.
 alt/error_expr_not_ok_alt4.nit:60,4--7: Type error: expected Bool, got Int
 alt/error_expr_not_ok_alt4.nit:60,20: Type error: expected A, got Int
 alt/error_expr_not_ok_alt4.nit:62,10--13: Type error: expected Bool, got Int
index 18b7c3a..d8ddb31 100644 (file)
@@ -11,7 +11,7 @@ alt/error_expr_not_ok_alt5.nit:43,1--8: Error: Method 'fail' doesn't exists in I
 alt/error_expr_not_ok_alt5.nit:45,7--10: Type error: expected A, got Object
 alt/error_expr_not_ok_alt5.nit:46,1--9: Error: Method 'fail' doesn't exists in Object.
 alt/error_expr_not_ok_alt5.nit:49,7--10: Type error: expected A, got Object
-alt/error_expr_not_ok_alt5.nit:50,1--10: Error: arity missmatch; prototype is 'trash(A)'.
+alt/error_expr_not_ok_alt5.nit:50,1--10: Error: arity mismatch; prototype is 'trash(x: A)'.
 alt/error_expr_not_ok_alt5.nit:60,4--7: Type error: expected Bool, got Int
 alt/error_expr_not_ok_alt5.nit:60,20: Type error: expected A, got Int
 alt/error_expr_not_ok_alt5.nit:62,10--13: Type error: expected Bool, got Int
index 20f98a5..5f13350 100644 (file)
@@ -1,4 +1,4 @@
-./error_init_auto.nit:34,5--9: Error: arity missmatch; prototype is 'init(Int)'.
-./error_init_auto.nit:36,5--14: Error: arity missmatch; prototype is 'init(Int)'.
-./error_init_auto.nit:37,5--17: Error: arity missmatch; prototype is 'init(Int)'.
+./error_init_auto.nit:34,5--9: Error: arity mismatch; prototype is 'init(recv: Int)'.
+./error_init_auto.nit:36,5--14: Error: arity mismatch; prototype is 'init(recv: Int)'.
+./error_init_auto.nit:37,5--17: Error: arity mismatch; prototype is 'init(recv: Int)'.
 ./error_init_auto.nit:38,5--15: Error: Method 'foo' doesn't exists in A.
index fda8cc8..8c3f211 100644 (file)
@@ -1,4 +1,4 @@
-alt/error_init_auto_alt1.nit:34,5--11: Error: arity missmatch; prototype is 'init'.
-alt/error_init_auto_alt1.nit:35,5--14: Error: arity missmatch; prototype is 'init'.
-alt/error_init_auto_alt1.nit:36,5--17: Error: arity missmatch; prototype is 'init'.
+alt/error_init_auto_alt1.nit:34,5--11: Error: arity mismatch; prototype is 'init'.
+alt/error_init_auto_alt1.nit:35,5--14: Error: arity mismatch; prototype is 'init'.
+alt/error_init_auto_alt1.nit:36,5--17: Error: arity mismatch; prototype is 'init'.
 alt/error_init_auto_alt1.nit:37,5--15: Error: Method 'foo' doesn't exists in A.
index 9a24c04..113433e 100644 (file)
@@ -1,4 +1,4 @@
-alt/error_init_auto_alt2.nit:33,5--9: Error: arity missmatch; prototype is 'init(Int,Int)'.
-alt/error_init_auto_alt2.nit:34,5--11: Error: arity missmatch; prototype is 'init(Int,Int)'.
-alt/error_init_auto_alt2.nit:36,5--17: Error: arity missmatch; prototype is 'init(Int,Int)'.
+alt/error_init_auto_alt2.nit:33,5--9: Error: arity mismatch; prototype is 'init(recv: Int, recv: Int)'.
+alt/error_init_auto_alt2.nit:34,5--11: Error: arity mismatch; prototype is 'init(recv: Int, recv: Int)'.
+alt/error_init_auto_alt2.nit:36,5--17: Error: arity mismatch; prototype is 'init(recv: Int, recv: Int)'.
 alt/error_init_auto_alt2.nit:37,5--15: Error: Method 'foo' doesn't exists in A.
index d5defda..c3598ce 100644 (file)
@@ -1,4 +1,4 @@
-alt/error_init_auto_alt3.nit:34,5--9: Error: arity missmatch; prototype is 'init(Int)'.
-alt/error_init_auto_alt3.nit:36,5--14: Error: arity missmatch; prototype is 'init(Int)'.
-alt/error_init_auto_alt3.nit:37,5--17: Error: arity missmatch; prototype is 'init(Int)'.
+alt/error_init_auto_alt3.nit:34,5--9: Error: arity mismatch; prototype is 'init(xx: Int)'.
+alt/error_init_auto_alt3.nit:36,5--14: Error: arity mismatch; prototype is 'init(xx: Int)'.
+alt/error_init_auto_alt3.nit:37,5--17: Error: arity mismatch; prototype is 'init(xx: Int)'.
 alt/error_init_auto_alt3.nit:38,5--15: Error: Method 'foo' doesn't exists in A.
index 1cafec3..8f21425 100644 (file)
                     ../src/syntax/typing.nit:1274,74
                       '1' ... ../src/syntax/typing.nit:1274,74
             ../src/syntax/typing.nit:1275,4--1276,15
-              ../src/syntax/typing.nit:1275,4--71
+              ../src/syntax/typing.nit:1275,4--70
                 ../src/syntax/typing.nit:1275,4
                   ../src/syntax/typing.nit:1275,4
                   'v' ... ../src/syntax/typing.nit:1275,4
                 'error' ... ../src/syntax/typing.nit:1275,6--10
                 ../src/syntax/typing.nit:1275,12--15
                   'self' ... ../src/syntax/typing.nit:1275,12--15
-                ../src/syntax/typing.nit:1275,18--71
-                  ../src/syntax/typing.nit:1275,18--57
-                    '"Error: arity missmatch; prototype is '{' ... ../src/syntax/typing.nit:1275,18--57
-                  ../src/syntax/typing.nit:1275,58--61
-                    ../src/syntax/typing.nit:1275,58
-                    'name' ... ../src/syntax/typing.nit:1275,58--61
-                  ../src/syntax/typing.nit:1275,62--63
-                    '}{' ... ../src/syntax/typing.nit:1275,62--63
-                  ../src/syntax/typing.nit:1275,64--67
-                    ../src/syntax/typing.nit:1275,64
-                    'psig' ... ../src/syntax/typing.nit:1275,64--67
-                  ../src/syntax/typing.nit:1275,68--71
-                    '}'."' ... ../src/syntax/typing.nit:1275,68--71
+                ../src/syntax/typing.nit:1275,18--70
+                  ../src/syntax/typing.nit:1275,18--56
+                    '"Error: arity mismatch; prototype is '{' ... ../src/syntax/typing.nit:1275,18--56
+                  ../src/syntax/typing.nit:1275,57--60
+                    ../src/syntax/typing.nit:1275,57
+                    'name' ... ../src/syntax/typing.nit:1275,57--60
+                  ../src/syntax/typing.nit:1275,61--62
+                    '}{' ... ../src/syntax/typing.nit:1275,61--62
+                  ../src/syntax/typing.nit:1275,63--66
+                    ../src/syntax/typing.nit:1275,63
+                    'psig' ... ../src/syntax/typing.nit:1275,63--66
+                  ../src/syntax/typing.nit:1275,67--70
+                    '}'."' ... ../src/syntax/typing.nit:1275,67--70
               ../src/syntax/typing.nit:1276,4--15
                 'return' ... ../src/syntax/typing.nit:1276,4--9
                 ../src/syntax/typing.nit:1276,11--15
index b2b9e78..480ba4f 100644 (file)
@@ -7778,13 +7778,13 @@ Read token at ../src/syntax/typing.nit:1275,6--10 text='error'
 Read token at ../src/syntax/typing.nit:1275,11 text='('
 Read token at ../src/syntax/typing.nit:1275,12--15 text='self'
 Read token at ../src/syntax/typing.nit:1275,16 text=','
-Read token at ../src/syntax/typing.nit:1275,18--57 text='"Error: arity missmatch; prototype is '{'
-Read token at ../src/syntax/typing.nit:1275,58--61 text='name'
-Read token at ../src/syntax/typing.nit:1275,62--63 text='}{'
-Read token at ../src/syntax/typing.nit:1275,64--67 text='psig'
-Read token at ../src/syntax/typing.nit:1275,68--71 text='}'."'
-Read token at ../src/syntax/typing.nit:1275,72 text=')'
-Read token at ../src/syntax/typing.nit:1275,73--1276,0 text='
+Read token at ../src/syntax/typing.nit:1275,18--56 text='"Error: arity mismatch; prototype is '{'
+Read token at ../src/syntax/typing.nit:1275,57--60 text='name'
+Read token at ../src/syntax/typing.nit:1275,61--62 text='}{'
+Read token at ../src/syntax/typing.nit:1275,63--66 text='psig'
+Read token at ../src/syntax/typing.nit:1275,67--70 text='}'."'
+Read token at ../src/syntax/typing.nit:1275,71 text=')'
+Read token at ../src/syntax/typing.nit:1275,72--1276,0 text='
 '
 Read token at ../src/syntax/typing.nit:1276,4--9 text='return'
 Read token at ../src/syntax/typing.nit:1276,11--15 text='false'