mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 18:58:36 +00:00
Avid reporting further error when an element is misspelled
eg, don't report an error for each callback or animation or changed event that the the property doesn't exist or such. Also reword the message when an element doesn't exist. Use "element" rather than "type" as it is more accurate.
This commit is contained in:
parent
5a796e6dc0
commit
1d3e9120d8
10 changed files with 35 additions and 24 deletions
|
@ -5,14 +5,17 @@ struct Struct := { def: int, }
|
|||
|
||||
export SuperSimple := Rectangle {
|
||||
DoesNotExist {
|
||||
// ^error{Unknown type DoesNotExist}
|
||||
// ^error{Unknown element 'DoesNotExist'}
|
||||
}
|
||||
|
||||
dd := DoesNotExist2 {
|
||||
// ^error{Unknown type DoesNotExist2}
|
||||
// ^error{Unknown element 'DoesNotExist2'}
|
||||
abc: 42;
|
||||
cb => {}
|
||||
animate abcd { duration: 3ms; }
|
||||
changed efgh => { self.foo(); }
|
||||
Hallo {}
|
||||
// ^error{Unknown type Hallo}
|
||||
// ^error{Unknown element 'Hallo'}
|
||||
Rectangle {
|
||||
background: blue;
|
||||
foo_bar: blue;
|
||||
|
@ -24,8 +27,9 @@ export SuperSimple := Rectangle {
|
|||
float {
|
||||
// ^error{'float' cannot be used as an element}
|
||||
abc: 42;
|
||||
cb => {}
|
||||
Hallo {}
|
||||
// ^error{Unknown type Hallo}
|
||||
// ^error{Unknown element 'Hallo'}
|
||||
|
||||
}
|
||||
|
||||
|
@ -34,7 +38,7 @@ export SuperSimple := Rectangle {
|
|||
def: "42";
|
||||
xyz: "42";
|
||||
Hallo {}
|
||||
// ^error{Unknown type Hallo}
|
||||
// ^error{Unknown element 'Hallo'}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
|
@ -44,9 +48,9 @@ export SuperSimple := Rectangle {
|
|||
}
|
||||
|
||||
NativeLineEdit { }
|
||||
// ^error{Unknown type NativeLineEdit. \(The type exist as an internal type, but cannot be accessed in this scope\)}
|
||||
// ^error{Unknown element 'NativeLineEdit'. \(The type exist as an internal type, but cannot be accessed in this scope\)}
|
||||
|
||||
Opacity { }
|
||||
// ^error{Unknown type Opacity. \(The type exist as an internal type, but cannot be accessed in this scope\)}
|
||||
// ^error{Unknown element 'Opacity'. \(The type exist as an internal type, but cannot be accessed in this scope\)}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue