Summary
typed-records: define-record-type constructor with arguments is specialized erroneously
Metadata
- Id: 14a19aebd9b02c6905362c1823220cb9b93ef650
- Trac id: 899
- Type: defect
- Reporter: syn
- Owner: felix
- Cc:
- Status: closed
- Component: extensions
- Estimated difficulty:
- Resolution: fixed
- Priority: minor
- Milestone:
- Version: 4.8.x
- Changetime: 2012-08-24 16:28:51 UTC
- Created: 2012-08-17 09:38:04 UTC
- Keywords:
Attachments
- 14a19aebd9b02c6905362c1823220cb9b93ef650/attachments/define-record-type-specializations.patch
Description
This program
(use typed-records) (define-record-type foo (make-foo bar) foo? (bar foo-bar foo-bar-set!)) (display (make-foo 1))
fails with Error: unbound variable: bar when compiled with -specialize. Tested with 4.8.0rc2.
Changes and comments
[2012-08-18 11:08:53 UTC] megane attached define-record-type-specializations.patch (description=#f)
[2012-08-18 11:16:03 UTC] megane wrote:
The generated specializations had slot symbols in them where one would expect #(1) style references to the arguments.
For example
(make-foo (#(procedure) make-foo (fixnum) (struct foo)) ((fixnum) (##sys#make-structure 'foo bar)))
instead of
(make-foo (#(procedure) make-foo (fixnum) (struct foo)) ((fixnum) (##sys#make-structure 'foo #(1))))
[2012-08-18 11:18:37 UTC] megane wrote:
I also noticed the egg uses `:' syntax to specify specializations (that get exported to the types file) although it's not documented anywhere that this is possible!
[2012-08-18 15:27:17 UTC] felix changed status from new to assigned
[2012-08-18 15:27:17 UTC] felix set owner to felix
[2012-08-18 15:27:17 UTC] felix removed milestone 4.8.0
[2012-08-24 16:28:51 UTC] felix changed status from assigned to closed
[2012-08-24 16:28:51 UTC] felix set resolution to fixed
[2012-08-24 16:28:51 UTC] felix wrote:
Thanks - patch applied (0.3).