mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 18:58:36 +00:00
Fix support for multiple import statements from the same path (#1868)
Importing multiple types from the same file with multiple import statements would produce an error.
This commit is contained in:
parent
809255ea56
commit
59d3a69688
7 changed files with 63 additions and 35 deletions
10
internal/compiler/tests/syntax/imports/import_error2.slint
Normal file
10
internal/compiler/tests/syntax/imports/import_error2.slint
Normal file
|
@ -0,0 +1,10 @@
|
|||
// Copyright © SixtyFPS GmbH <info@slint-ui.com>
|
||||
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-commercial
|
||||
|
||||
import { SomeRect } from "../../typeloader/incpath/local_helper_type.slint";
|
||||
import "../../typeloader/incpath/local_helper_type.slint";
|
||||
// ^error{Import names are missing. Please specify which types you would like to import}
|
||||
|
||||
X := Rectangle {
|
||||
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
// Copyright © SixtyFPS GmbH <info@slint-ui.com>
|
||||
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-commercial
|
||||
|
||||
import { } from yo;
|
||||
// ^error{Expected plain string literal}
|
||||
import { Foo } from yo;
|
||||
// ^error{Expected plain string literal}
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright © SixtyFPS GmbH <info@slint-ui.com>
|
||||
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-commercial
|
||||
|
||||
import { NotExported } from "../../typeloader/incpath/local_helper_type.slint";
|
||||
import { } from "../../typeloader/incpath/local_helper_type.slint";
|
||||
// ^error{Import names are missing. Please specify which types you would like to import}
|
||||
|
||||
X := Rectangle {
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue