mirror of
https://github.com/odin-lang/Odin.git
synced 2026-08-14 01:34:35 +00:00
Create regression test
This commit is contained in:
13
tests/issues/test_issue_7012.odin
Normal file
13
tests/issues/test_issue_7012.odin
Normal file
@@ -0,0 +1,13 @@
|
||||
// Tests issue https://github.com/odin-lang/Odin/issues/7012
|
||||
package test_issues
|
||||
|
||||
import "base:intrinsics"
|
||||
|
||||
Foo :: struct($T: typeid) {
|
||||
x: T,
|
||||
}
|
||||
|
||||
#assert(intrinsics.type_is_specialization_of(Foo(int), Foo))
|
||||
#assert(!intrinsics.type_is_specialization_of(Foo, Foo))
|
||||
#assert(!intrinsics.type_is_specialization_of(Foo(int), Foo(int)))
|
||||
#assert(!intrinsics.type_is_specialization_of(i32, Foo))
|
||||
Reference in New Issue
Block a user