bug-kawa
[Top][All Lists]
Advanced

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

[Bug-kawa] [bug #44398] Unnecessary Warning when binding java object ins


From: Per Bothner
Subject: [Bug-kawa] [bug #44398] Unnecessary Warning when binding java object instances to a name
Date: Sun, 01 Mar 2015 15:12:52 +0000
User-agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0

Update of bug #44398 (project kawa):

                  Status:                    None => Invalid                

    _______________________________________________________

Follow-up Comment #1:

The "no known slot" message means there is no slot known *at compile-time*, so
the compiler has to generate code to do a run-time lookup (using reflection). 
This succeeds, but is much slower.

The reason is due to the REPL: The compiler can't be sure that b is a point. 
After all the next statement could be:

  (set! b "not-a-point")


Instead of 'define' you could use the new '!' operator, which is similar to
define-constant (but will allow pattern-match).  You can also use
'define-constant', 'define-private', or plain define with a type-specifier:

  (define b ::point (point))


This is not a problem in a file (as long as it is processd in whole-file mode
rather than line-at-a-time mode).


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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