]> gitweb.factorcode.org Git - factor.git/blob - basis/compiler/tests/redefine6.factor
Rename lookup to lookup-word.
[factor.git] / basis / compiler / tests / redefine6.factor
1 USING: eval tools.test compiler.units vocabs words
2 kernel ;
3 IN: compiler.tests.redefine6
4
5 ! Mixin redefinition did not recompile all necessary words.
6
7 [ ] [ [ "compiler.tests.redefine6" forget-vocab ] with-compilation-unit ] unit-test
8
9 [ ] [
10     "USING: kernel kernel.private ;
11     IN: compiler.tests.redefine6
12     GENERIC: my-generic ( a -- b )
13     MIXIN: my-mixin
14     M: my-mixin my-generic drop 0 ;
15     : my-inline ( a -- b ) { my-mixin } declare my-generic ;"
16     eval( -- )
17 ] unit-test
18
19 [ ] [
20     "USING: kernel ;
21     IN: compiler.tests.redefine6
22     TUPLE: my-tuple ;
23     M: my-tuple my-generic drop 1 ;
24     INSTANCE: my-tuple my-mixin"
25     eval( -- )
26 ] unit-test
27
28 [ 1 ] [
29     "my-tuple" "compiler.tests.redefine6" lookup-word boa
30     "my-inline" "compiler.tests.redefine6" lookup-word execute
31 ] unit-test