bug-kawa
[Top][All Lists]
Advanced

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

[Bug-kawa] [bug #43749] writing to parameter / type-switch


From: Seth Alves
Subject: [Bug-kawa] [bug #43749] writing to parameter / type-switch
Date: Thu, 04 Dec 2014 02:21:04 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:33.0) Gecko/20100101 Firefox/33.0

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

                 Summary: writing to parameter / type-switch
                 Project: Kawa
            Submitted by: sethalves
            Submitted on: Thu 04 Dec 2014 02:21:03 AM GMT
                Category: Scheme language
                Severity: 3 - Normal
              Item Group: Run-time exception
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:


Though it's poor form and easy to work around, most scheme's allow this:

(define (foo . opt)
  (set! opt (if (null? opt) #f (car opt)))
  opt)

(display (foo 1))
(newline)

./kawa-type-switch.scm:7:13: warning - type java.lang.Boolean is incompatible
with required type list
./kawa-type-switch.scm:7:3: warning - cannot convert literal (of type
java.lang.Boolean) to Type list
Value '1' for variable 'opt' has wrong type (integer) (gnu.math.IntNum cannot
be cast to gnu.lists.LList)
    at kawa$Mntype$Mnswitch.foo$V(kawa-type-switch.scm:7)
    at kawa$Mntype$Mnswitch.applyN(kawa-type-switch.scm:6)
...





    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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