mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-03 15:14:35 +00:00

Given the test case import { SomeType } from "somewhere.60"; import { Blah } from "foo.60"; and foo.60 trying to use "SomeType": export Blah := SomeType {} then the lookup for "SomeType" in foo.60 should fail. Instead it leaked through the populated type registry when processing the dependencies for the outer file. This is fixed by ensuring that the type registry for a file only has the global type registry as parent. To ensure that the test reliably covers this, the import dependencies are now processed in declaration order (hence the switch to IndexMap that preserves insertion order).
19 lines
616 B
Text
19 lines
616 B
Text
|
|
/* LICENSE BEGIN
|
|
This file is part of the SixtyFPS Project -- https://sixtyfps.io
|
|
Copyright (c) 2020 Olivier Goffart <olivier.goffart@sixtyfps.io>
|
|
Copyright (c) 2020 Simon Hausmann <simon.hausmann@sixtyfps.io>
|
|
|
|
SPDX-License-Identifier: GPL-3.0-only
|
|
This file is also available under commercial licensing terms.
|
|
Please contact info@sixtyfps.io for more information.
|
|
LICENSE END */
|
|
|
|
import { SomeRect } from "../../typeloader/incpath/local_helper_type.60";
|
|
|
|
import { X } from "../../typeloader/incpath/should_fail.60";
|
|
|
|
Blah := X {
|
|
width: 100px;
|
|
// ^error{Unknown property width in X}
|
|
}
|