diff options
Diffstat (limited to 'tests/issues/test_issue_2666.odin')
| -rw-r--r-- | tests/issues/test_issue_2666.odin | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/issues/test_issue_2666.odin b/tests/issues/test_issue_2666.odin new file mode 100644 index 000000000..dd77129ea --- /dev/null +++ b/tests/issues/test_issue_2666.odin @@ -0,0 +1,26 @@ +// Tests issue https://github.com/odin-lang/Odin/issues/2666 +// @(disabled=<boolean>) does not work with polymorphic procs +package test_issues + +import "core:testing" + +@(test) +test_disabled_parapoly :: proc(t: ^testing.T) { + disabled_parapoly(t, 1) + disabled_parapoly_constant(t, 1) +} + +@(private="file") +@(disabled = true) +disabled_parapoly :: proc(t: ^testing.T, num: $T) { + testing.error(t, "disabled_parapoly should be disabled") +} + +@(private="file") +DISABLE :: true + +@(disabled = DISABLE) +@(private = "file") +disabled_parapoly_constant :: proc(t: ^testing.T, num: $T) { + testing.error(t, "disabled_parapoly_constant should be disabled") +} |