From 1585bfec3bf6d6ad59f2bcbc82be2b2ba87f7313 Mon Sep 17 00:00:00 2001 From: Bung Date: Sun, 11 Dec 2022 13:58:29 +0800 Subject: [PATCH] fix #16758 Nim crashes in fixAbstractType (#20855) * fix #16758 Nim crashes in fixAbstractType * Update compiler/semexprs.nim Co-authored-by: Andreas Rumpf Co-authored-by: Andreas Rumpf --- compiler/semexprs.nim | 3 +++ tests/macros/t16758.nim | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 tests/macros/t16758.nim diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim index 22a247cebd..064eae0b71 100644 --- a/compiler/semexprs.nim +++ b/compiler/semexprs.nim @@ -693,6 +693,9 @@ proc semArrayConstr(c: PContext, n: PNode, flags: TExprFlags; expectedType: PTyp proc fixAbstractType(c: PContext, n: PNode) = for i in 1..