mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 21:39:07 +00:00
Verify that all builtin types are exposed
This commit is contained in:
parent
8e2eb2b28d
commit
1d2b095814
1 changed files with 8 additions and 0 deletions
|
@ -964,6 +964,14 @@ macro_rules! define_builtins {
|
|||
$(
|
||||
$(
|
||||
$(
|
||||
// All types should be exposed, and all non-types
|
||||
// should not be exposed. (Types are uppercase.)
|
||||
//
|
||||
// We only check this in debug builds so that in
|
||||
// release builds, this condition is either `if true`
|
||||
// or `if false` and will get optimized out.
|
||||
debug_assert_eq!($exposed_apply_type, $ident_name.chars().next().unwrap().is_uppercase());
|
||||
|
||||
if $exposed_apply_type {
|
||||
scope.insert($ident_name.into(), (Symbol::new(ModuleId::$module_const, IdentId($ident_id)), Region::zero()));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue