blob: 48e1ee516fa1d45e9fa40266b1f0661563993ad7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
// Tests issue #2395 https://github.com/odin-lang/Odin/issues/2395
// Ensures that we no longer raise the faulty error for #no_nil unions when
// then are 2 variants with the polymorphic type. Also ensure that we raise
// exactly 2 errors from the invalid unions
package test_issues
import "core:testing"
ValidUnion :: union($T: typeid) #no_nil {
T,
f32,
}
OtherValidUnion :: union($T: typeid, $S: typeid) #no_nil {
T,
S,
}
InvalidUnion :: union($T: typeid) #no_nil {
T,
}
OtherInvalidUnion :: union($T: typeid) #no_nil {
u8,
}
main :: proc() {
}
|