mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
fixes #3541
This commit is contained in:
@@ -416,8 +416,7 @@ proc newLit*(i: BiggestInt): NimNode {.compileTime.} =
|
||||
|
||||
proc newLit*(b: bool): NimNode {.compileTime.} =
|
||||
## produces a new boolean literal node.
|
||||
result = newNimNode(nnkIntLit)
|
||||
result.intVal = ord(b)
|
||||
result = if b: bindSym"true" else: bindSym"false"
|
||||
|
||||
proc newLit*(f: BiggestFloat): NimNode {.compileTime.} =
|
||||
## produces a new float literal node.
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
discard """
|
||||
output: '''1
|
||||
0
|
||||
1
|
||||
0
|
||||
1
|
||||
0
|
||||
1
|
||||
0'''
|
||||
output: '''true
|
||||
false
|
||||
true
|
||||
false
|
||||
true
|
||||
false
|
||||
true
|
||||
false'''
|
||||
"""
|
||||
|
||||
import macros
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
discard """
|
||||
output: '''1
|
||||
0
|
||||
1
|
||||
0
|
||||
1
|
||||
0
|
||||
1
|
||||
0
|
||||
1
|
||||
0'''
|
||||
output: '''true
|
||||
false
|
||||
true
|
||||
false
|
||||
true
|
||||
false
|
||||
true
|
||||
false
|
||||
true
|
||||
false'''
|
||||
"""
|
||||
|
||||
import macros
|
||||
|
||||
14
web/news.txt
14
web/news.txt
@@ -2,6 +2,20 @@
|
||||
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
|
||||
==================================
|
||||
|
||||
|
||||
Reference in New Issue
Block a user