mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 14:00:35 +00:00
* fix #19304 Borrowing std/times.format causes Error: illformed AST * follow suggestions * mitigate for #4121 * improve error message
This commit is contained in:
7
tests/stdlib/t19304.nim
Normal file
7
tests/stdlib/t19304.nim
Normal file
@@ -0,0 +1,7 @@
|
||||
import times
|
||||
|
||||
type DjangoDateTime* = distinct DateTime
|
||||
|
||||
# proc toTime*(x: DjangoDateTime): Time {.borrow.} # <-- works
|
||||
proc format*(x: DjangoDateTime, f: TimeFormat,
|
||||
loc: DateTimeLocale = DefaultLocale): string {.borrow.}
|
||||
Reference in New Issue
Block a user