fixes #3541
This commit is contained in:
parent
1757b8466d
commit
ba6d0eb4db
4 changed files with 33 additions and 20 deletions
|
|
@ -416,8 +416,7 @@ proc newLit*(i: BiggestInt): NimNode {.compileTime.} =
|
||||||
|
|
||||||
proc newLit*(b: bool): NimNode {.compileTime.} =
|
proc newLit*(b: bool): NimNode {.compileTime.} =
|
||||||
## produces a new boolean literal node.
|
## produces a new boolean literal node.
|
||||||
result = newNimNode(nnkIntLit)
|
result = if b: bindSym"true" else: bindSym"false"
|
||||||
result.intVal = ord(b)
|
|
||||||
|
|
||||||
proc newLit*(f: BiggestFloat): NimNode {.compileTime.} =
|
proc newLit*(f: BiggestFloat): NimNode {.compileTime.} =
|
||||||
## produces a new float literal node.
|
## produces a new float literal node.
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
discard """
|
discard """
|
||||||
output: '''1
|
output: '''true
|
||||||
0
|
false
|
||||||
1
|
true
|
||||||
0
|
false
|
||||||
1
|
true
|
||||||
0
|
false
|
||||||
1
|
true
|
||||||
0'''
|
false'''
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import macros
|
import macros
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,14 @@
|
||||||
discard """
|
discard """
|
||||||
output: '''1
|
output: '''true
|
||||||
0
|
false
|
||||||
1
|
true
|
||||||
0
|
false
|
||||||
1
|
true
|
||||||
0
|
false
|
||||||
1
|
true
|
||||||
0
|
false
|
||||||
1
|
true
|
||||||
0'''
|
false'''
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import macros
|
import macros
|
||||||
|
|
|
||||||
14
web/news.txt
14
web/news.txt
|
|
@ -2,6 +2,20 @@
|
||||||
News
|
News
|
||||||
====
|
====
|
||||||
|
|
||||||
|
..
|
||||||
|
2015-11-XX Version 0.12.2 released
|
||||||
|
==================================
|
||||||
|
|
||||||
|
This is a bugfix release.
|
||||||
|
|
||||||
|
|
||||||
|
Changes affecting backwards compatibility
|
||||||
|
-----------------------------------------
|
||||||
|
|
||||||
|
- ``macros.newLit`` for ``bool`` now produces false/true symbols which
|
||||||
|
actually work with the bool datatype.
|
||||||
|
|
||||||
|
|
||||||
2015-10-27 Version 0.12.0 released
|
2015-10-27 Version 0.12.0 released
|
||||||
==================================
|
==================================
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue