bug-kawa
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-kawa] [bug #39945] "Too few arguments" warning when declaring an an


From: anonymous
Subject: [Bug-kawa] [bug #39945] "Too few arguments" warning when declaring an anonymous class in a let block
Date: Wed, 04 Sep 2013 22:04:46 +0000
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36

URL:
  <http://savannah.gnu.org/bugs/?39945>

                 Summary: "Too few arguments" warning when declaring an
anonymous class in a let block
                 Project: Kawa
            Submitted by: None
            Submitted on: Wed 04 Sep 2013 10:04:46 PM UTC
                Category: Type declaration and inference
                Severity: 3 - Normal
              Item Group: Run-time exception
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

Declaring an anonymous Runnable this way works just fine:

#|kawa:12|# (define x::java.lang.Runnable
  (object (java.lang.Runnable) ((run) (write "foo"))))
#|(---:13|# #|kawa:14|# 
#|kawa:15|# (x:run)
"foo"


But using it in a let block results in a cryptic runtime error message:

#|kawa:16|# (let
    ((x::java.lang.Runnable
      (object (java.lang.Runnable) ((run) (write "foo")))))
  (x:run))#|(---:17|# #|(---:18|# #|(---:19|# 
/dev/stdin:19:3: warning - too few arguments for method 'run' in
atInteractiveLevel$10$0
Argument  'address@hidden' to 'invoke-static' has wrong type
(atInteractiveLevel$10$0) (expected: class-specifier)
        at gnu.kawa.reflect.Invoke.typeFrom(Invoke.java:74)
        at gnu.kawa.reflect.Invoke.apply(Invoke.java:87)
        at gnu.mapping.CallContext.runUntilDone(CallContext.java:234)
        at gnu.expr.ModuleExp.evalModule2(ModuleExp.java:373)
        at gnu.expr.ModuleExp.evalModule(ModuleExp.java:210)
        at kawa.Shell.run(Shell.java:279)
        at kawa.Shell.run(Shell.java:194)
        at kawa.Shell.run(Shell.java:175)
        at kawa.repl.main(repl.java:890)
#|kawa:20|# 


This might be an issue with inferencing the type of the anonymous Runnable
class when used in a let block.




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?39945>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]