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
commit 80c360fceb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 6 deletions

View file

@ -1690,9 +1690,7 @@ proc createVar(p: PProc, typ: PType, indirect: bool): Rope =
result = putToSeq("null", indirect)
of tySequence, tyString:
result = putToSeq("[]", indirect)
of tyCString:
result = putToSeq("\"\"", indirect)
of tyOpt, tyProc:
of tyCString, tyOpt, tyProc:
result = putToSeq("null", indirect)
of tyStatic:
if t.n != nil: