bug-kawa
[Top][All Lists]
Advanced

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

[Bug-kawa] [bug #31355] warn-access-unknown-field


From: Helmut Eller
Subject: [Bug-kawa] [bug #31355] warn-access-unknown-field
Date: Thu, 21 Oct 2010 09:33:06 +0000
User-agent: Opera/9.80 (X11; Linux i686; U; en) Presto/2.6.30 Version/10.63

Follow-up Comment #3, bug #31355 (project kawa):

I think an full error is a too much in this case.
If the probability for false positives is small
enough than it would be good to warn about it by default.
But I think the probability is quite high.
Consider code like:

(define (foo (l <list>))
  (cond ((instance? l <pair>)
         (let ((p :: pair l))
           (list (field p 'car)
                 (field l 'car))))
        (#t #f)))

Kawa only warns when accessing l.  It could also warn on p because the
gnu.lists.Pair class has no public field car (only a getCar method).
Under a more liberal interpretation both warnings are false positives,
because the type test guarantees that the getCar method will be found
at runtime.

I think it shouldn't even be a full warning only
an efficiency note.



    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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