define-constant: incorrect compilation

Vladimir Tsichevski wowa1@online.ru
Sat Mar 29 18:22:00 GMT 2003


Hi,

file bug.scm containing the only line:

(define-constant theConstant 'theValue)

compiles as:

public class bug extends ModuleBody
{
    public static final Object theConstant;
   
    public int numArgs() {
    return 0;
    }
   
    public final void apply(CallContext $ctx) {
    gnu.lists.Consumer $result = $ctx.consumer;
    }
}

as you may see, the variable theConstant is NOT initialised with 
"theValue" string as it should be.

note: if you modify the declaration so it has type specifier, i.e:

(define-constant theConstant :: <String> 'theValue)

then it compiles correctly.

Regards,

Vladimir




More information about the Kawa mailing list