mirror of
https://github.com/odin-lang/Odin.git
synced 2026-06-08 19:44:20 +00:00
add test file
This commit is contained in:
14
tests/issues/test_issue_6240.odin
Normal file
14
tests/issues/test_issue_6240.odin
Normal file
@@ -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]{})
|
||||
}
|
||||
Reference in New Issue
Block a user