From 1a27af515f2dc431f7593b99d30a49a952486fbb Mon Sep 17 00:00:00 2001 From: Louis Novy <101842021+louisnovy@users.noreply.github.com> Date: Sun, 1 Mar 2026 21:18:30 -0800 Subject: [PATCH] add test file --- tests/issues/test_issue_6240.odin | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/issues/test_issue_6240.odin diff --git a/tests/issues/test_issue_6240.odin b/tests/issues/test_issue_6240.odin new file mode 100644 index 000000000..a56f44f33 --- /dev/null +++ b/tests/issues/test_issue_6240.odin @@ -0,0 +1,14 @@ +// Tests issue #6240 https://github.com/odin-lang/Odin/issues/6240 +package test_issues + +// should error - N=10 does not match bit_set range 0..<5 +foo :: proc($N: int, b: $B/bit_set[0 ..< N]) {} + +// should error without segfaulting - undefined identifier in bit_set range +bar :: proc(b: $B/bit_set[0 ..< asdf]) {} + +main :: proc() { + b: bit_set[0 ..< 5] + foo(10, b) + bar(bit_set[0 ..< 1]{}) +}