fix #14350, cstrings in JS init as null (#14355)

* fix #14350, cstrings in JS init as null
This commit is contained in:
hlaaftana
2020-05-15 11:07:30 +03:00
committed by GitHub
parent 278b4582f5
commit 80c360fceb
4 changed files with 11 additions and 6 deletions

View File

@@ -62,8 +62,8 @@ block:
result = result and obj1.`&&`.addr[] == "bar".cstring
result = result and obj2.`if` == 0
result = result and obj2.`for` == 0
result = result and obj2.`==`.len == 0
result = result and obj2.`&&`.len == 0
result = result and obj2.`==`.isNil
result = result and obj2.`&&`.isNil
echo test()
# Test codegen for fields with uppercase letters:

View File

@@ -322,7 +322,7 @@ o = [Field0 = [a = "",
b = @[]],
Field1 = ""],
p = nil,
q = ""]
q = nil]
""")
doAssert(repr(cc) == """
[a = 12,