Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
skip tyAlias in generic alias checks [backport:2.0] (#24417)
fixes #24415 Since #23978 (which is in 2.0), all generic types that alias to another type now insert a `tyAlias` layer in their value. However the `skipGenericAlias` etc code which `sigmatch` uses is not updated for this, so `tyAlias` is now skipped in these. The relevant code in sigmatch is: https://github.com/nim-lang/Nim/blob/67ad1ae1598b08039c971812dc172dd48624b7b0/compiler/sigmatch.nim#L1668-L1673 This behavior is also suspicious IMO, not skipping a structural `tyGenericInst` alias can be useful for code like #10220, but this is currently arbitrarily decided based on "depth" and whether the alias is to another `tyGenericInst` type or not. Maybe in the future we could enforce the use of a nominal type.
- Loading branch information