const view types; fixes some cases from https://github.com/nim-lang/Nim/issues/15428 (#15488)

This commit is contained in:
Andreas Rumpf 2020-10-05 18:31:46 +02:00 • committed by GitHub
commit 4e438f9096
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 94 additions and 47 deletions

View file

@ -1807,7 +1807,7 @@ proc getNullValue(typ: PType, info: TLineInfo; conf: ConfigRef): PNode =
result.add getNullValue(t[i], info, conf)
of tySet:
result = newNodeIT(nkCurly, info, t)
of tySequence:
of tySequence, tyOpenArray:
result = newNodeIT(nkBracket, info, t)
else:
globalError(conf, info, "cannot create null element for: " & $t.kind)