~ chicken-core (chicken-5) 6c822ec6d576e9f6e36edcdbc9fd26e2595e44b5
commit 6c822ec6d576e9f6e36edcdbc9fd26e2595e44b5
Author: Evan Hanson <evhan@foldling.org>
AuthorDate: Sun Jul 24 12:28:31 2016 +1200
Commit: Evan Hanson <evhan@foldling.org>
CommitDate: Sun Jul 24 12:28:31 2016 +1200
Use "~a" formatter for procedure names in scrutiny output
In some `list-ref` and `vector-ref` calls for which an
index-out-of-range scrutiny message is printed, the procedure name is a
string rather than a symbol. We should find where this difference is
introduced and fix it, but until then we need to use the "~a" output
formatter so these procedure names are printed without surrounding
quotes.
diff --git a/scrutinizer.scm b/scrutinizer.scm
index f29f4d08..9eb00529 100644
--- a/scrutinizer.scm
+++ b/scrutinizer.scm
@@ -2177,7 +2177,7 @@
val
(begin
(report
- loc "~ain procedure call to `~s', index ~a out of range \
+ loc "~ain procedure call to `~a', index ~a out of range \
for vector of length ~a"
(node-source-prefix node)
;; TODO: It might make more sense to use "pname" here
@@ -2264,7 +2264,7 @@
(or (and (>= val 0) (split-list-type arg1 val k))
(begin
(report
- loc "~ain procedure call to `~s', index ~a out of \
+ loc "~ain procedure call to `~a', index ~a out of \
range for list of type ~a"
(node-source-prefix node)
;; TODO: It might make more sense to use
diff --git a/tests/scrutiny.expected b/tests/scrutiny.expected
index e21eb969..8446362c 100644
--- a/tests/scrutiny.expected
+++ b/tests/scrutiny.expected
@@ -147,46 +147,46 @@ Warning: at toplevel:
(scrutiny-tests.scm:208) in procedure call to `f', expected argument #1 of type `list' but was given an argument of type `(pair fixnum fixnum)'
Warning: in toplevel procedure `vector-ref-warn1':
- (scrutiny-tests.scm:214) in procedure call to `"vector-ref"', index -1 out of range for vector of length 3
+ (scrutiny-tests.scm:214) in procedure call to `vector-ref', index -1 out of range for vector of length 3
Warning: in toplevel procedure `vector-ref-warn2':
- (scrutiny-tests.scm:216) in procedure call to `"vector-ref"', index 3 out of range for vector of length 3
+ (scrutiny-tests.scm:216) in procedure call to `vector-ref', index 3 out of range for vector of length 3
Warning: in toplevel procedure `vector-ref-warn3':
- (scrutiny-tests.scm:217) in procedure call to `"vector-ref"', index 4 out of range for vector of length 3
+ (scrutiny-tests.scm:217) in procedure call to `vector-ref', index 4 out of range for vector of length 3
Warning: in toplevel procedure `vector-ref-standard-warn1':
(scrutiny-tests.scm:220) in procedure call to `vector-ref', expected argument #2 of type `fixnum' but was given an argument of type `symbol'
Warning: in toplevel procedure `vector-set!-warn1':
- (scrutiny-tests.scm:221) in procedure call to `"vector-set!"', index -1 out of range for vector of length 3
+ (scrutiny-tests.scm:221) in procedure call to `vector-set!', index -1 out of range for vector of length 3
Warning: in toplevel procedure `vector-set!-warn2':
- (scrutiny-tests.scm:222) in procedure call to `"vector-set!"', index 3 out of range for vector of length 3
+ (scrutiny-tests.scm:222) in procedure call to `vector-set!', index 3 out of range for vector of length 3
Warning: in toplevel procedure `vector-set!-warn3':
- (scrutiny-tests.scm:223) in procedure call to `"vector-set!"', index 4 out of range for vector of length 3
+ (scrutiny-tests.scm:223) in procedure call to `vector-set!', index 4 out of range for vector of length 3
Warning: in toplevel procedure `vector-set!-standard-warn1':
(scrutiny-tests.scm:226) in procedure call to `vector-set!', expected argument #2 of type `fixnum' but was given an argument of type `symbol'
Warning: in toplevel procedure `list-ref-warn1':
- (scrutiny-tests.scm:232) in procedure call to `"list-ref"', index -1 out of range for list of type (list symbol symbol symbol)
+ (scrutiny-tests.scm:232) in procedure call to `list-ref', index -1 out of range for list of type (list symbol symbol symbol)
Warning: in toplevel procedure `list-ref-warn2':
- (scrutiny-tests.scm:234) in procedure call to `"list-ref"', index -1 out of range for list of type (pair symbol (pair symbol (pair symbol *)))
+ (scrutiny-tests.scm:234) in procedure call to `list-ref', index -1 out of range for list of type (pair symbol (pair symbol (pair symbol *)))
Warning: in toplevel procedure `list-ref-warn3':
- (scrutiny-tests.scm:236) in procedure call to `"list-ref"', index 3 out of range for list of type (list symbol symbol symbol)
+ (scrutiny-tests.scm:236) in procedure call to `list-ref', index 3 out of range for list of type (list symbol symbol symbol)
Warning: in toplevel procedure `list-ref-warn4':
- (scrutiny-tests.scm:238) in procedure call to `"list-ref"', index 3 out of range for list of type (pair symbol (pair symbol (pair symbol *)))
+ (scrutiny-tests.scm:238) in procedure call to `list-ref', index 3 out of range for list of type (pair symbol (pair symbol (pair symbol *)))
Warning: in toplevel procedure `list-ref-warn5':
- (scrutiny-tests.scm:240) in procedure call to `"list-ref"', index 4 out of range for list of type (list symbol symbol symbol)
+ (scrutiny-tests.scm:240) in procedure call to `list-ref', index 4 out of range for list of type (list symbol symbol symbol)
Warning: in toplevel procedure `list-ref-warn6':
- (scrutiny-tests.scm:242) in procedure call to `"list-ref"', index 4 out of range for list of type (pair symbol (pair symbol (pair symbol *)))
+ (scrutiny-tests.scm:242) in procedure call to `list-ref', index 4 out of range for list of type (pair symbol (pair symbol (pair symbol *)))
Warning: in toplevel procedure `list-ref-standard-warn1':
(scrutiny-tests.scm:254) in procedure call to `list-ref', expected argument #2 of type `fixnum' but was given an argument of type `symbol'
Trap