nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
nitvm: Method dispatch is functionnal with perfect hashing
[nit.git]
/
tests
/
base_at_cached.nit
diff --git
a/tests/base_at_cached.nit
b/tests/base_at_cached.nit
index
3a01508
..
b6159a6
100644
(file)
--- a/
tests/base_at_cached.nit
+++ b/
tests/base_at_cached.nit
@@
-17,7
+17,9
@@
import kernel
class Base
var foo: Int = 10
fun -: Int do return foo + 20
class Base
var foo: Int = 10
fun -: Int do return foo + 20
- fun bar: Int = -self + 40
+ fun bar: Int do return -self + 40
+ #alt1#fun fail is cached do end
+ #alt2#fun fail(i: Int): Int is cached do return i
end
class CMinus
end
class CMinus
@@
-32,6
+34,8
@@
class CBar
redef fun bar is cached do return -self + 2
end
redef fun bar is cached do return -self + 2
end
+#alt3#fun fail: Int is cached do return 0
+
fun test(b: Base)
do
b.foo.output
fun test(b: Base)
do
b.foo.output