Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. Its design focuses on efficiency, expressiveness, and elegance (in that order of priority).
Kind of related to #4858 etc, Nim accepts that 1 matches range[1..8] so it passes it directly as a static type, but its actual type remains as int. Passing range[1..8](1) instead works.
Description
When I define a generic type and a proc with a static range generic parameter and call it, it always cause type mismatch compile error.
Nim Version
Nim Compiler Version 2.1.1 [Linux: amd64] Compiled at 2024-02-22 Copyright (c) 2006-2024 by Andreas Rumpf
git hash: 59c65009a57ba7f9677590c5066496bb85864ab8 active boot switches: -d:release
Current Output
Expected Output
Possible Solution
No response
Additional Information
No response