mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-01 12:20:26 +02:00
* module/srfi/srfi-9.scm (define-record-type)[constructor]: Use `define-inlinable' instead of `define'. * test-suite/lib.scm (exception:syntax-pattern-unmatched): New variable. * test-suite/tests/srfi-9.test ("constructor")["foo 0 args (inline)", "foo 2 args (inline)"]: New tests. ["foo 0 args", "foo 2 args"]: Adjust to constructor inlining. * testsuite/t-records.scm: Remove wrong-arg-count case.
14 lines
262 B
Scheme
14 lines
262 B
Scheme
;;; SRFI-9 Records.
|
||
;;;
|
||
|
||
(use-modules (srfi srfi-9))
|
||
|
||
(define-record-type <stuff>
|
||
(%make-stuff chbouib)
|
||
stuff?
|
||
(chbouib stuff:chbouib stuff:set-chbouib!))
|
||
|
||
|
||
(and (stuff? (%make-stuff 12))
|
||
(= 7 (stuff:chbouib (%make-stuff 7)))
|
||
(not (stuff? 12)))
|