summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2018-01-08 20:04:25 +0100
committerAndreas Rumpf <rumpf_a@web.de>2018-01-08 20:04:25 +0100
commit437caf4358b5513be64f144ee52e438c42508c0c (patch)
treee4abff0d84716c1a972228ec1affc65165469534 /lib
parent2015895357cd1d32b4ae93a9b527b6d1171d8189 (diff)
parente2f1f8bafa2c21b19875b3a75392c9a77ecade0b (diff)
downloadNim-437caf4358b5513be64f144ee52e438c42508c0c.tar.gz
Merge branch 'devel' into nimv2
Diffstat (limited to 'lib')
-rw-r--r--lib/pure/strformat.nim5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/pure/strformat.nim b/lib/pure/strformat.nim
index 180cbcbec..e04c80794 100644
--- a/lib/pure/strformat.nim
+++ b/lib/pure/strformat.nim
@@ -224,7 +224,7 @@ template callFormatOption(res, arg, option) {.dirty.} =
   else:
     res.add format(arg, option)
 
-macro fmt*(pattern: string): untyped =
+macro fmt*(pattern: string{lit}): untyped =
   ## For a specification of the ``fmt`` macro, see the module level documentation.
   runnableExamples:
     template check(actual, expected: string) =
@@ -332,7 +332,7 @@ macro fmt*(pattern: string): untyped =
     # works:
     import times
 
-    var nullTime: TimeInfo
+    var nullTime: DateTime
     check fmt"{nullTime:yyyy-mm-dd}", "0000-00-00"
 
     # Unicode string tests
@@ -609,7 +609,6 @@ proc format*(value: string; specifier: string; res: var string) =
   ## sense to call this directly, but it is required to exist
   ## by the ``fmt`` macro.
   let spec = parseStandardFormatSpecifier(specifier)
-  var fmode = ffDefault
   case spec.typ
   of 's', '\0': discard
   else: