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:
Simon Hausmann 2022-11-21 15:37:38 +01:00 committed by GitHub
parent 809255ea56
commit 59d3a69688
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 63 additions and 35 deletions

View 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 {
}

View file

@ -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}

View file

@ -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 {
}