1// Copyright © SixtyFPS GmbH <info@slint.dev>
2// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0
3
4struct Struct := { def: int, }
5
6export SuperSimple := Rectangle {
7 DoesNotExist {
8// ^error{Unknown element 'DoesNotExist'}
9 }
10
11 dd := DoesNotExist2 {
12// ^error{Unknown element 'DoesNotExist2'}
13 abc: 42;
14 cb => {}
15 animate abcd { duration: 3ms; }
16 changed efgh => { self.foo(); }
17 Hallo {}
18// ^error{Unknown element 'Hallo'}
19 Rectangle {
20 background: blue;
21 foo_bar: blue;
22// ^error{Unknown property foo-bar in Rectangle}
23// ^^error{Unknown unqualified identifier 'blue'}
24 }
25 }
26
27 float {
28// ^error{'float' cannot be used as an element}
29 abc: 42;
30 cb => {}
31 Hallo {}
32// ^error{Unknown element 'Hallo'}
33
34 }
35
36 s := Struct {
37// ^error{'Struct' cannot be used as an element}
38 def: "42";
39 xyz: "42";
40 Hallo {}
41// ^error{Unknown element 'Hallo'}
42 }
43
44 Rectangle {
45 foo_bar: blue;
46// ^error{Unknown property foo-bar in Rectangle}
47// ^^error{Unknown unqualified identifier 'blue'}
48 }
49
50 NativeLineEdit { }
51// ^error{Unknown element 'NativeLineEdit'. \(The type exist as an internal type, but cannot be accessed in this scope\)}
52
53 Opacity { }
54// ^error{Unknown element 'Opacity'. \(The type exist as an internal type, but cannot be accessed in this scope\)}
55
56}
57