diff options
author | ringabout <43030857+ringabout@users.noreply.github.com> | 2023-05-24 13:43:30 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-24 07:43:30 +0200 |
commit | 761b927e4700ecda2dde8b16fb8beab791436e99 (patch) | |
tree | 2b1f5cdf6dea11820b6d63469cbcbeea7f12efe9 /compiler/semexprs.nim | |
parent | 9493e6729138ecfdbc3f6ad433a32fcf19467a34 (diff) | |
download | Nim-761b927e4700ecda2dde8b16fb8beab791436e99.tar.gz |
fixes #21863; Incorrect enum field access can cause internal error (#21886)
fixes 21863; Incorrect enum field access can cause internal error
Diffstat (limited to 'compiler/semexprs.nim')
-rw-r--r-- | compiler/semexprs.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim index f90ef4870..ae118159c 100644 --- a/compiler/semexprs.nim +++ b/compiler/semexprs.nim @@ -1047,7 +1047,7 @@ proc semIndirectOp(c: PContext, n: PNode, flags: TExprFlags; expectedType: PType if s != nil: setGenericParams(c, n[0]) return semDirectOp(c, n, flags, expectedType) - elif isSymChoice(n[0]): + elif isSymChoice(n[0]) and nfDotField notin n.flags: # overloaded generic procs e.g. newSeq[int] can end up here return semDirectOp(c, n, flags, expectedType) |