nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tests: add some runtime error in nitin.input
[nit.git]
/
tests
/
base_var_type_evolution_nullable.nit
diff --git
a/tests/base_var_type_evolution_nullable.nit
b/tests/base_var_type_evolution_nullable.nit
index
a6e25fe
..
b0f26a4
100644
(file)
--- a/
tests/base_var_type_evolution_nullable.nit
+++ b/
tests/base_var_type_evolution_nullable.nit
@@
-13,17
+13,17
@@
# limitations under the License.
import end
# limitations under the License.
import end
-
-class Object
- fun ==(o: nullable Object): Bool is intern
- fun !=(o: nullable Object): Bool is intern
+interface Object
+ fun ==(o: nullable Object): Bool do return self.is_same_instance(o)
+ fun !=(o: nullable Object): Bool do return not self == o
+ fun is_same_instance(o: nullable Object): Bool is intern
end
end
-
class A
end
class A
end
-
class Bool
fun output is intern
class Bool
fun output is intern
+ redef fun ==(o: nullable Object): Bool is intern
+ redef fun !=(o: nullable Object): Bool is intern
end
fun test(a: nullable A)
end
fun test(a: nullable A)