tests: update error_inh_clash*
authorJean Privat <jean@pryen.org>
Tue, 6 Aug 2013 15:14:30 +0000 (11:14 -0400)
committerJean Privat <jean@pryen.org>
Tue, 6 Aug 2013 15:14:30 +0000 (11:14 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

tests/error_inh_clash2.nit [new file with mode: 0644]
tests/error_inh_clash3.nit [new file with mode: 0644]
tests/error_inh_clash4.nit [new file with mode: 0644]
tests/sav/error_inh_clash.res [new file with mode: 0644]
tests/sav/error_inh_clash2.res [new file with mode: 0644]
tests/sav/error_inh_clash2.sav [new file with mode: 0644]
tests/sav/error_inh_clash3.res [new file with mode: 0644]
tests/sav/error_inh_clash3.sav [new file with mode: 0644]
tests/sav/error_inh_clash4.res [new file with mode: 0644]
tests/sav/error_inh_clash4.sav [new file with mode: 0644]

diff --git a/tests/error_inh_clash2.nit b/tests/error_inh_clash2.nit
new file mode 100644 (file)
index 0000000..a66d081
--- /dev/null
@@ -0,0 +1,26 @@
+# This file is part of NIT ( http://www.nitlanguage.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.
+
+class A
+       super Array[Int]
+end
+
+class B
+       super Array[Char]
+end
+
+class C
+       super A
+       super B
+end
diff --git a/tests/error_inh_clash3.nit b/tests/error_inh_clash3.nit
new file mode 100644 (file)
index 0000000..f205c7a
--- /dev/null
@@ -0,0 +1,26 @@
+# This file is part of NIT ( http://www.nitlanguage.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.
+
+class A[E]
+       super Array[E]
+end
+
+class B[F]
+       super List[F]
+end
+
+class C
+       super A[Int]
+       super B[Char]
+end
diff --git a/tests/error_inh_clash4.nit b/tests/error_inh_clash4.nit
new file mode 100644 (file)
index 0000000..8f9928f
--- /dev/null
@@ -0,0 +1,18 @@
+# This file is part of NIT ( http://www.nitlanguage.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.
+
+class A[E, F]
+       super Array[E]
+       super List[F]
+end
diff --git a/tests/sav/error_inh_clash.res b/tests/sav/error_inh_clash.res
new file mode 100644 (file)
index 0000000..ab8fbea
--- /dev/null
@@ -0,0 +1 @@
+error_inh_clash.nit:17,7: Error: Incompatibles ancestors for A: Array[Int], Array[Char]
diff --git a/tests/sav/error_inh_clash2.res b/tests/sav/error_inh_clash2.res
new file mode 100644 (file)
index 0000000..d8b254e
--- /dev/null
@@ -0,0 +1 @@
+error_inh_clash2.nit:23,7: Error: Incompatibles ancestors for C: Array[Char], Array[Int]
diff --git a/tests/sav/error_inh_clash2.sav b/tests/sav/error_inh_clash2.sav
new file mode 100644 (file)
index 0000000..11a0dfd
--- /dev/null
@@ -0,0 +1 @@
+Fatal error: Incompatibles ancestors for C: Array[Int], Array[Char]
diff --git a/tests/sav/error_inh_clash3.res b/tests/sav/error_inh_clash3.res
new file mode 100644 (file)
index 0000000..542859b
--- /dev/null
@@ -0,0 +1,2 @@
+error_inh_clash3.nit:23,7: Error: Incompatibles ancestors for C: Sequence[Char], Sequence[Int]
+error_inh_clash3.nit:23,7: Error: Incompatibles ancestors for C: SequenceRead[Char], SequenceRead[Int]
diff --git a/tests/sav/error_inh_clash3.sav b/tests/sav/error_inh_clash3.sav
new file mode 100644 (file)
index 0000000..c1b242f
--- /dev/null
@@ -0,0 +1 @@
+Fatal error: Incompatibles ancestors for C: SequenceRead[Int], SequenceRead[Char]
diff --git a/tests/sav/error_inh_clash4.res b/tests/sav/error_inh_clash4.res
new file mode 100644 (file)
index 0000000..638259a
--- /dev/null
@@ -0,0 +1,2 @@
+error_inh_clash4.nit:15,7: Error: Incompatibles ancestors for A: Sequence[A#1], Sequence[A#0]
+error_inh_clash4.nit:15,7: Error: Incompatibles ancestors for A: SequenceRead[A#1], SequenceRead[A#0]
diff --git a/tests/sav/error_inh_clash4.sav b/tests/sav/error_inh_clash4.sav
new file mode 100644 (file)
index 0000000..5e5c7a7
--- /dev/null
@@ -0,0 +1 @@
+Runtime error: Cast failed (metamodel/type_formal.nit:39)