mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-28 10:20:05 +00:00
Add #no_type_assert and #type_assert to disable implicit type assertions with x.(T)
This commit is contained in:
@@ -1991,6 +1991,13 @@ void lb_build_stmt(lbProcedure *p, Ast *node) {
|
||||
out |= StateFlag_no_bounds_check;
|
||||
out &= ~StateFlag_bounds_check;
|
||||
}
|
||||
if (in & StateFlag_no_type_assert) {
|
||||
out |= StateFlag_no_type_assert;
|
||||
out &= ~StateFlag_type_assert;
|
||||
} else if (in & StateFlag_type_assert) {
|
||||
out |= StateFlag_type_assert;
|
||||
out &= ~StateFlag_no_type_assert;
|
||||
}
|
||||
|
||||
p->state_flags = out;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user