nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tests: update sav/test_parser* because AST changes
[nit.git]
/
tests
/
test_paire.nit
diff --git
a/tests/test_paire.nit
b/tests/test_paire.nit
index
391b7a6
..
f393851
100644
(file)
--- a/
tests/test_paire.nit
+++ b/
tests/test_paire.nit
@@
-15,26
+15,26
@@
# limitations under the License.
class Pair[F, S]
# limitations under the License.
class Pair[F, S]
- meth first: F
+ fun first: F
do
return _first
end
do
return _first
end
- meth second: S
+ fun second: S
do
return _second
end
do
return _second
end
- meth set(f: F, s: S)
+ fun set(f: F, s: S)
do
_first = f
_second = s
end
do
_first = f
_second = s
end
- redef meth to_s: String
+ redef fun to_s: String
do
return "{first}:{_second}"
end
private
do
return "{first}:{_second}"
end
private
- attr _first: F
- attr _second: S
+ var first: F
+ var second: S
init(f: F, s: S)
do
init(f: F, s: S)
do
@@
-42,18
+42,18
@@
private
end
end
end
end
-class Pair[E: Comparable, E: Comparable]
+class Pair[E: Comparable, F: Comparable]
- meth >(p: Pair[Comparable, Comparable]): Bool
+ fun >(p: Pair[Comparable, Comparable]): Bool
do
return _first > p.first or
first == p.first and second > p._second
end
end
do
return _first > p.first or
first == p.first and second > p._second
end
end
-class Pair[E: Int, E: Int]
+class Pair[E: Int, F: Int]
- meth sum: Int
+ fun sum: Int
do
return first + _second
end
do
return first + _second
end