syntax: bug to fix: specialize broken type
authorJean Privat <jean@pryen.org>
Sat, 4 Jul 2009 02:52:02 +0000 (22:52 -0400)
committerJean Privat <jean@pryen.org>
Sat, 4 Jul 2009 02:52:02 +0000 (22:52 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

tests/error_type_not_ok.nit [new file with mode: 0644]
tests/error_type_not_ok2.nit [new file with mode: 0644]
tests/sav/error_type_not_ok.sav [new file with mode: 0644]

diff --git a/tests/error_type_not_ok.nit b/tests/error_type_not_ok.nit
new file mode 100644 (file)
index 0000000..16cbee2
--- /dev/null
@@ -0,0 +1,23 @@
+# 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.
+
+#alt1#class Fail[E]
+#alt1#end
+
+class A
+special Fail
+end
+
diff --git a/tests/error_type_not_ok2.nit b/tests/error_type_not_ok2.nit
new file mode 100644 (file)
index 0000000..3aad87b
--- /dev/null
@@ -0,0 +1,23 @@
+# 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.
+
+#alt1#class Fail[E]
+#alt1#end
+
+class B
+special Array[Fail]
+end
+
diff --git a/tests/sav/error_type_not_ok.sav b/tests/sav/error_type_not_ok.sav
new file mode 100644 (file)
index 0000000..8a1c5fd
--- /dev/null
@@ -0,0 +1 @@
+./error_type_not_ok.nit:21,9: Type error: class Fail not found in module error_type_not_ok.