Skip to content

Commit

Permalink
Use correct parent for date* in makeexn
Browse files Browse the repository at this point in the history
Please merge to 5.3.2
  • Loading branch information
takikawa committed Jan 12, 2013
1 parent d95be2e commit 2ac6615
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion collects/racket/private/kernstruct.rkt
Expand Up @@ -537,7 +537,7 @@
(quote-syntax date-minute)
(quote-syntax date-second))
'(#f #f #f #f #f #f #f #f #f #f #f #f)
#t))
(quote-syntax date)))
(λ () (quote-syntax kernel:date*)))))
(begin
(#%require (rename '#%kernel kernel:srcloc srcloc))
Expand Down
5 changes: 5 additions & 0 deletions collects/tests/racket/date.rktl
Expand Up @@ -99,4 +99,9 @@
(test "JD 12" julian/scalinger->string 12)
(test "JD 123" julian/scalinger->string 123)

;; make sure that date* has the correct parent info
(test #t date*?
(struct-copy date* (seconds->date (current-seconds))
[hour #:parent date 5]))

(report-errs)
2 changes: 1 addition & 1 deletion src/racket/src/makeexn
Expand Up @@ -253,7 +253,7 @@ Not an exception in the above sense:
date-month date-day date-hour date-minute date-second) #t)
(date* (date*-time-zone-name date*-nanosecond
date-time-zone-offset date-dst? date-year-day date-week-day date-year
date-month date-day date-hour date-minute date-second) #t)
date-month date-day date-hour date-minute date-second) date)
(srcloc (srcloc-span srcloc-position srcloc-column srcloc-line srcloc-source) #t))))

(with-output-to-file filename #:exists 'replace
Expand Down

0 comments on commit 2ac6615

Please sign in to comment.