This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Strange things with "get-" prefix and native Kawa classes
- From: Alex Moiseenko <imdagger at yandex dot ru>
- To: kawa at sourceware dot org
- Date: Sun, 30 Dec 2012 04:33:13 +0400
- Subject: Strange things with "get-" prefix and native Kawa classes
Hi, is it correct behavior for Kawa? May be I don't understand something and I should not use functions with "get-" prefix for native kawa classes:
imdagger@thug-machine:~/Projects/Planets/util$ java -jar kawa-1.13.1.jar --version
Kawa 1.13.1 (revision 7415)
Copyright (C) 2012 Per Bothner
(define-simple-class A ()
((get-some-func) ::int 3))
(define-class B ()
((get-some-func) ::int 4)
((not-get-func) ::int 4))
(display (A):some-func) (newline)
(display ((A):get-some-func)) (newline)
(display (B):some-func) (newline)
(display ((B):get-some-func)) (newline)
(display ((B):not-get-func)) (newline)
** But I didn't expect to get two zeros in result **:
imdagger@thug-machine:~/Projects/Planets/util$ java -jar kawa-1.13.1.jar test.scm
3
3
0
0
4
FYI: I checked decompiled version of this file, and I saw that here were two methods for get-some-func (static and non-static). And
static method returned default value (I understand that it's necessary method for internals).
--
Alex Moiseenko