nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tests: Do not rely on the implicit fixing of type bounds
[nit.git]
/
tests
/
example_sorter.nit
diff --git
a/tests/example_sorter.nit
b/tests/example_sorter.nit
index
ae839ed
..
7f43b63
100644
(file)
--- a/
tests/example_sorter.nit
+++ b/
tests/example_sorter.nit
@@
-17,7
+17,7
@@
class BackIntComparator
super Comparator
class BackIntComparator
super Comparator
- redef type COMPARED: Int
+ redef type COMPARED: Int is fixed
redef fun compare(a: Int, b: Int): Int
do
return b <=> a
redef fun compare(a: Int, b: Int): Int
do
return b <=> a
@@
-28,7
+28,7
@@
end
class DecimalComparator
super Comparator
class DecimalComparator
super Comparator
- redef type COMPARED: Int
+ redef type COMPARED: Int is fixed
redef fun compare(a: Int, b: Int): Int
do
return (a%10) <=> (b%10)
redef fun compare(a: Int, b: Int): Int
do
return (a%10) <=> (b%10)