summary refs log tree commit diff stats
path: root/tests/ccgbugs
diff options
context:
space:
mode:
authorflywind <xzsflywind@gmail.com>2022-01-17 18:14:13 +0800
committerGitHub <noreply@github.com>2022-01-17 11:14:13 +0100
commit4f6b59de9698d0c29a2170ecc23c8d009b3181b7 (patch)
treed084e65daee82649989354688a646f710b5d6331 /tests/ccgbugs
parent2c5b367001cc53859048d9adf450a5db3a949b92 (diff)
downloadNim-4f6b59de9698d0c29a2170ecc23c8d009b3181b7.tar.gz
mangle names in nimbase.h using cppDefine (#19395) [backport]
mangle names in nimbase.h
fix comments
Diffstat (limited to 'tests/ccgbugs')
-rw-r--r--tests/ccgbugs/tmangle.nim16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ccgbugs/tmangle.nim b/tests/ccgbugs/tmangle.nim
new file mode 100644
index 000000000..0050cef92
--- /dev/null
+++ b/tests/ccgbugs/tmangle.nim
@@ -0,0 +1,16 @@
+block:
+  proc hello() =
+    let NAN_INFINITY = 12
+    doAssert NAN_INFINITY == 12
+    let INF = "2.0"
+    doAssert INF == "2.0"
+    let NAN = 2.3
+    doAssert NAN == 2.3
+
+  hello()
+
+block:
+  proc hello(NAN: float) =
+    doAssert NAN == 2.0
+
+  hello(2.0)