]> gitweb.factorcode.org Git - factor.git/blob - basis/compiler/tests/redefine10.factor
merge project-euler.factor
[factor.git] / basis / compiler / tests / redefine10.factor
1 USING: eval tools.test compiler.units vocabs words kernel ;
2 IN: compiler.tests.redefine10
3
4 ! Mixin redefinition did not recompile all necessary words.
5
6 [ ] [ [ "compiler.tests.redefine10" forget-vocab ] with-compilation-unit ] unit-test
7
8 [ ] [
9     "USING: kernel math classes ;
10     IN: compiler.tests.redefine10
11     MIXIN: my-mixin
12     INSTANCE: fixnum my-mixin
13     : my-inline ( a -- b ) dup my-mixin instance? [ 1 + ] when ;"
14     eval( -- )
15 ] unit-test
16
17 [ ] [
18     "USE: math
19     IN: compiler.tests.redefine10
20     INSTANCE: float my-mixin"
21     eval( -- )
22 ] unit-test
23
24 [ 2.0 ] [
25     1.0 "my-inline" "compiler.tests.redefine10" lookup execute
26 ] unit-test