mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 10:50:00 +00:00
Limit re-exporting of types
- Only allow one module re-export per file - Warn when a re-exported type clashes with a locally exported type, and prioritize the local type.
This commit is contained in:
parent
8faf57fa40
commit
554d153e35
3 changed files with 31 additions and 18 deletions
|
@ -2214,8 +2214,11 @@ impl Exports {
|
|||
for export in other_exports {
|
||||
match self.0.binary_search_by(|entry| entry.0.cmp(&export.0)) {
|
||||
Ok(_) => {
|
||||
diag.push_error(
|
||||
format!("re-export '{}' is already exported in this file", &*export.0),
|
||||
diag.push_warning(
|
||||
format!(
|
||||
"'{}' is already exported in this file; it will not be re-exported",
|
||||
&*export.0
|
||||
),
|
||||
&export.0.name_ident,
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue