mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 10:50:00 +00:00
Disallow duplicated callback declarations
A duplicated callback would silently overwrite the previous declaration, which is counter-intuitive.
This commit is contained in:
parent
bae5dbfa16
commit
27db2bdcc6
3 changed files with 20 additions and 10 deletions
|
@ -15,7 +15,7 @@ Comp := Rectangle {
|
|||
|
||||
callback cb1(Rectangle);
|
||||
// ^error{'Rectangle' is not a valid type}
|
||||
callback cb1() -> Rectangle;
|
||||
callback cb2() -> Rectangle;
|
||||
// ^error{'Rectangle' is not a valid type}
|
||||
}
|
||||
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
|
||||
SubElements := Rectangle {
|
||||
callback foobar;
|
||||
callback foobar;
|
||||
// ^error{Duplicated callback declaration}
|
||||
|
||||
callback callback_with_arg(int, string);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue