summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authormetagn <metagngn@gmail.com>2022-11-12 07:27:51 +0300
committerGitHub <noreply@github.com>2022-11-12 05:27:51 +0100
commit77e58bf573040cc081a58046a97f1ddfb61f27fe (patch)
tree3f302a19790d8f1d7bb0c040842bf2b4d52451fe /tests
parent8e1181bde593ba3ab4409f1454a7b7280b659cd0 (diff)
downloadNim-77e58bf573040cc081a58046a97f1ddfb61f27fe.tar.gz
fixes #20807, refs #20450, regression with seq inference (#20818)
Diffstat (limited to 'tests')
-rw-r--r--tests/types/ttopdowninference.nim11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/types/ttopdowninference.nim b/tests/types/ttopdowninference.nim
index e4a340034..310dbb2ad 100644
--- a/tests/types/ttopdowninference.nim
+++ b/tests/types/ttopdowninference.nim
@@ -244,3 +244,14 @@ block: # bug #11777
   type S = set[0..5]
   var s: S = {1, 2}
   doAssert 1 in s
+
+block: # regression #20807
+  var s: seq[string]
+  template fail =
+    s = @[]
+  template test(body: untyped) =
+    body
+  proc test(a: string) = discard
+  test: fail()
+  doAssert not (compiles do:
+    let x: seq[int] = `@`[string]([]))