From 7ef4bffa797623c608c15329717f0a9ee06a5d38 Mon Sep 17 00:00:00 2001
From: Ridho Pratama
Date: Tue, 8 Oct 2019 16:12:24 +0700
Subject: renderer letAux fix only for octal literal (#12343)
* renderer letAux fix only for octal literal
* Handle when it's octal -1 for i64
* Added testcases
---
nimdoc/testproject/expected/testproject.html | 47 ++++++++++++++++++++++++++++
nimdoc/testproject/expected/theindex.html | 16 ++++++++++
nimdoc/testproject/testproject.nim | 7 ++++-
3 files changed, 69 insertions(+), 1 deletion(-)
(limited to 'nimdoc')
diff --git a/nimdoc/testproject/expected/testproject.html b/nimdoc/testproject/expected/testproject.html
index 273defbbf..8c9082d7a 100644
--- a/nimdoc/testproject/expected/testproject.html
+++ b/nimdoc/testproject/expected/testproject.html
@@ -849,6 +849,20 @@ function main() {
+
+ Consts
+
+
Procs
@@ -938,6 +952,39 @@ The enum B.
+
+
+
+
+
+
+
+C_A = 0x7FF0000000000000'f64
+-
+
+
+
+
+
+C_B = 0o377'i8
+-
+
+
+
+
+
+C_C = 0o277'i8
+-
+
+
+
+
+
+C_D = 0o177777'i16
+-
+
+
+
diff --git a/nimdoc/testproject/expected/theindex.html b/nimdoc/testproject/expected/theindex.html
index f97ea54b9..5b7cefced 100644
--- a/nimdoc/testproject/expected/theindex.html
+++ b/nimdoc/testproject/expected/theindex.html
@@ -840,6 +840,22 @@ function main() {
- testproject: buzz[T](a, b: T): T
+C_A:
+C_B:
+C_C:
+C_D:
enumValueA:
- SomeType.enumValueA
diff --git a/nimdoc/testproject/testproject.nim b/nimdoc/testproject/testproject.nim
index c3ab6a153..d1fcf58cd 100644
--- a/nimdoc/testproject/testproject.nim
+++ b/nimdoc/testproject/testproject.nim
@@ -9,6 +9,11 @@ runnableExamples:
# bug #11078
for x in "xx": discard
+const
+ C_A* = 0x7FF0000000000000'f64
+ C_B* = 0o377'i8
+ C_C* = 0o277'i8
+ C_D* = 0o177777'i16
template foo*(a, b: SomeType) =
## This does nothing
@@ -31,7 +36,7 @@ import std/macros
macro bar*(): untyped =
result = newStmtList()
-var aVariable*: array[1,int]
+var aVariable*: array[1, int]
aEnum()
bEnum()
--
cgit 1.4.1-2-gfad0