[Top][All Lists]

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

Re: [Chicken-users] no type error calling |append!|

From: Evan Hanson
Subject: Re: [Chicken-users] no type error calling |append!|
Date: Wed, 8 Jan 2014 15:55:53 +1300

Hi Alan,

On 2014-01-05 18:18, Alan Post wrote:
>   $ csi -n
>   #;1> (use srfi-1)
>   #;2> (append! "foo" "bar" '())
>   ()

This isn't actually types.db at work, but the runtime checks (or lack
thereof) in `append!`. With the scrutinizer, you'd see something like:

    $ csc foo.scm

    Warning: at toplevel:
      (foo.scm:1) in procedure call to `append!', expected argument #1 of type 
`list', but was given an argument of type `string'.

So types.db will help if you heed its warnings when compiling, but the
way `append!` is written it'll happily ignore any non-pair arguments you
give it (which I agree is strange, but I don't know if it should be
changed; others may).



reply via email to

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