--- /dev/null
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Copyright 2009 Jean Privat <jean@pryen.org>
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import kernel
+
+class A
+ readable attr _x: Int #!alt1#
+ #alt1#readable attr _x: Int = 2
+ readable attr _y: Int = -2 #!alt2#
+ #alt2#readable attr _y: Int
+ #alt3#init (xx: Int) do _x = xx
+ #alt4#init foo(xx: Int) do _x = xx
+ meth work
+ do
+ _x.output
+ _y.output
+ end
+end
+
+var a: A
+a = new A(1)#!alt1##!alt2##!alt3##!alt4#
+#alt1#a = new A
+#alt2#a = new A(3, -3)
+#alt3#a = new A(4)
+#alt4#a = new A.foo(5)
+a.work
+
+
--- /dev/null
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Copyright 2009 Jean Privat <jean@pryen.org>
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import kernel
+
+class A
+ readable attr _x: Int #!alt1#
+ #alt1#readable attr _x: Int = 2
+ readable attr _y: Int = -2 #!alt2#
+ #alt2#readable attr _y: Int
+ #alt3#init (xx: Int) do _x = xx
+ #alt4#init foo(xx: Int) do _x = xx
+ meth work
+ do
+ _x.output
+ _y.output
+ end
+end
+
+var a: A
+a = new A
+a = new A(1)
+a = new A(2, 2)
+a = new A(3, 3, 3)
+a = new A.foo(5)
+a.work
+
+
--- /dev/null
+./error_init_auto.nit:34,5--9: Error: Method 'init' arity missmatch.
+./error_init_auto.nit:36,5--14: Error: Method 'init' arity missmatch.
+./error_init_auto.nit:37,5--17: Error: Method 'init' arity missmatch.
+./error_init_auto.nit:38,5--15: Error: Method 'foo' doesn't exists in A.
--- /dev/null
+alt/error_init_auto_alt1.nit:34,5--11: Error: Method 'init' arity missmatch.
+alt/error_init_auto_alt1.nit:35,5--14: Error: Method 'init' arity missmatch.
+alt/error_init_auto_alt1.nit:36,5--17: Error: Method 'init' arity missmatch.
+alt/error_init_auto_alt1.nit:37,5--15: Error: Method 'foo' doesn't exists in A.
--- /dev/null
+alt/error_init_auto_alt2.nit:33,5--9: Error: Method 'init' arity missmatch.
+alt/error_init_auto_alt2.nit:34,5--11: Error: Method 'init' arity missmatch.
+alt/error_init_auto_alt2.nit:36,5--17: Error: Method 'init' arity missmatch.
+alt/error_init_auto_alt2.nit:37,5--15: Error: Method 'foo' doesn't exists in A.
--- /dev/null
+alt/error_init_auto_alt3.nit:34,5--9: Error: Method 'init' arity missmatch.
+alt/error_init_auto_alt3.nit:36,5--14: Error: Method 'init' arity missmatch.
+alt/error_init_auto_alt3.nit:37,5--17: Error: Method 'init' arity missmatch.
+alt/error_init_auto_alt3.nit:38,5--15: Error: Method 'foo' doesn't exists in A.
--- /dev/null
+alt/error_init_auto_alt4.nit:34,5--9: Error: Method 'init' doesn't exists in A.
+alt/error_init_auto_alt4.nit:35,5--11: Error: Method 'init' doesn't exists in A.
+alt/error_init_auto_alt4.nit:36,5--14: Error: Method 'init' doesn't exists in A.
+alt/error_init_auto_alt4.nit:37,5--17: Error: Method 'init' doesn't exists in A.