[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-kawa] [bugs #11775] apparently no way to invoke (environment-bound?
From: |
Steve Yegge |
Subject: |
[Bug-kawa] [bugs #11775] apparently no way to invoke (environment-bound?) |
Date: |
Sat, 29 Jan 2005 00:55:09 +0000 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 |
URL:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=11775>
Summary: apparently no way to invoke (environment-bound?)
Project: Kawa
Submitted by: stevey
Submitted on: Sat 01/29/2005 at 00:55
Category: Scheme library
Severity: 5 - Average
Item Group: Run-time exception
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
_______________________________________________________
Details:
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
_______________________________________________________
This item URL is:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=11775>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Bug-kawa] [bugs #11775] apparently no way to invoke (environment-bound?),
Steve Yegge <=