Sat 29 Jan 2005 12:55:09 AM UTC, original submission:
Bug (Sun JDK5.0, cygwin/xp, kawa-1.7.91 from cvs)
There appears to be no way to invoke the environment-bound?
function without getting a type error. Appears to be a type
mismatch between the scheme side and the java side.
- Function: environment-bound? environment symbol
Return true `#t' if there is a binding for SYMBOL in ENVIRONMENT;
otherwise returns `#f'.
(environment-bound? (interaction-environment) 'base-uri)
Argument #2 (base-uri) to 'gnu.mapping.Environment.isBound(gnu.mapping.Symbol)'
has wrong type (java.lang.String) (java.lang.String)
at gnu.mapping.WrongType.make(WrongType.java:118)
at kawa.lib.misc.isEnvironmentBound(misc.scm:31)
at kawa.lib.misc.apply2(misc.scm:28)
at gnu.expr.ModuleMethod.apply2(ModuleMethod.java:189)
at gnu.expr.ModuleMethod.apply(ModuleMethod.java:157)
at gnu.mapping.CallContext.runUntilDone(CallContext.java:237)
at gnu.expr.ModuleExp.evalModule(ModuleExp.java:256)
at kawa.Shell.run(Shell.java:231)
at kawa.Shell.run(Shell.java:177)
at kawa.Shell.run(Shell.java:164)
at kawa.Shell.run(Shell.java:151)
at kawa.repl.main(repl.java:672)
Caused by: java.lang.ClassCastException: java.lang.String
... 11 more
(environment-bound? (interaction-environment) "base-uri")
=> same error
kawa.lib.misc.scm:
(define (environment-bound? (env :: <gnu.mapping.Environment>)
(sym :: <String>))
:: <boolean>
(invoke env 'isBound sym))
gnu.mapping.Environment.java:
public boolean isBound(Symbol key, Object property)
{
Location loc = lookup(key, property);
if (loc == null)
return false;
return loc.isBound();
}
(environment-bound? (interaction-environment)
(make <java.lang.String> "base-uri"))
=> same error
(let ((str :: <String> "base-uri"))
(environment-bound? (interaction-environment) str))
=> same error
|