(compiling ./MyTest.scm to MyTest)
./MyTest.scm:9:13: warning - type integeris incompatible with required type symbol
./MyTest.scm:9:5: warning - cannot convert literal (of type gnu.math.IntNum) to ClassType gnu.mapping.Symbol
0,32 real 0,53 user 0,07 sys
java.lang.ClassCastException: class gnu.math.IntNum cannot be cast toclass gnu.mapping.Symbol (gnu.math.IntNum and gnu.mapping.Symbol are in unnamed moduleof loader 'app')
at MyTest.main(MyTest.scm:9)
at MyTest.run(MyTest.scm:5)
Program :
(module-name MyTest) (module-compile-options main: #t) (define (main) (define ar ::java.util.ArrayList[symbol] (java.util.ArrayList)) (ar:add 'a) (ar:size) (ar:add 1)) (main)
Error:
(compiling ./MyTest.scm to MyTest) ./MyTest.scm:9:13: warning - type integer is incompatible with required type symbol ./MyTest.scm:9:5: warning - cannot convert literal (of type gnu.math.IntNum) to ClassType gnu.mapping.Symbol 0,32 real 0,53 user 0,07 sys java.lang.ClassCastException: class gnu.math.IntNum cannot be cast to class gnu.mapping.Symbol (gnu.math.IntNum and gnu.mapping.Symbol are in unnamed module of loader 'app') at MyTest.main(MyTest.scm:9) at MyTest.run(MyTest.scm:5)
µ