102e3247bc
Let #[slhx::component] preserve inline modules when generated symbols are absent, while still enforcing handler completeness when slhx.syms exists. req: component/005 req: test/002
22 lines
403 B
Rust
22 lines
403 B
Rust
use slhx_derive::{component, surface};
|
|
|
|
#[component]
|
|
mod local_component {
|
|
pub const EXISTING: u8 = 1;
|
|
}
|
|
|
|
#[surface]
|
|
mod ui {
|
|
pub const EXISTING: u8 = 1;
|
|
}
|
|
|
|
#[test]
|
|
fn surface_macro_preserves_inline_module_with_generated_file() {
|
|
assert_eq!(ui::EXISTING, 1);
|
|
}
|
|
|
|
#[test]
|
|
fn component_macro_preserves_inline_module_without_generated_symbols() {
|
|
assert_eq!(local_component::EXISTING, 1);
|
|
}
|