Skip to content

Commit e53bc16

Browse files
committed
Add #assert(intrinsics.type_is_superset_of(File_Stream_Mode, io.Stream_Mode))
1 parent d380b08 commit e53bc16

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

core/os/os2/file_stream.odin

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package os2
22

3+
import "base:intrinsics"
34
import "base:runtime"
45
import "core:io"
56

@@ -14,10 +15,11 @@ File_Stream_Mode :: enum {
1415
Seek,
1516
Size,
1617
Destroy,
17-
Query, // query what modes are available
18+
Query, // query what modes are available on `io.Stream`
1819

1920
Fstat, // File specific (not available on io.Stream)
2021
}
22+
#assert(intrinsics.type_is_superset_of(File_Stream_Mode, io.Stream_Mode))
2123

2224
// Superset interface of io.Stream_Proc with the added `runtime.Allocator` parameter needed for the Fstat mode
2325
File_Stream_Proc :: #type proc(

0 commit comments

Comments
 (0)