summary refs log tree commit diff stats
path: root/compiler/ccgmerge_unused.nim
diff options
context:
space:
mode:
authormetagn <metagngn@gmail.com>2024-09-19 08:19:07 +0300
committerGitHub <noreply@github.com>2024-09-19 07:19:07 +0200
commitff005ad7dc8b4f3a36a1eb0e18ebd4cc5e062883 (patch)
tree7920309ebbbb5a0acab46d6c3e40731920c599e0 /compiler/ccgmerge_unused.nim
parent6cc50ec3163c79b120bf17e32810946bad6b3893 (diff)
downloadNim-ff005ad7dc8b4f3a36a1eb0e18ebd4cc5e062883.tar.gz
fix segfault in generic param mismatch error, skip typedesc (#24140)
refs #24010, refs
https://github.com/nim-lang/Nim/issues/24125#issuecomment-2358377076

The generic mismatch errors added in #24010 made it possible for `nArg`
to be `nil` in the error reporting since it checked the call argument
list, not the generic parameter list for the mismatching argument node,
which causes a segfault. This is fixed by checking the generic parameter
list immediately on any generic mismatch error.

Also the `typedesc` type is skipped for the value of the generic params
since it's redundant and the generic parameter constraints don't have
it.
Diffstat (limited to 'compiler/ccgmerge_unused.nim')
0 files changed, 0 insertions, 0 deletions