mirror of
https://github.com/slint-ui/slint.git
synced 2025-11-17 18:57:10 +00:00
Also properly error out when the number of arguments to a callback alias is not correct Fixes #7806
18 lines
No EOL
495 B
Text
18 lines
No EOL
495 B
Text
// Copyright © SixtyFPS GmbH <info@slint.dev>
|
|
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0
|
|
|
|
export global Abc {
|
|
callback foobar;
|
|
}
|
|
|
|
component Wrapper {
|
|
callback foo <=> Abc.foobar;
|
|
// ^warning{Aliases to global callback are deprecated}
|
|
}
|
|
|
|
export component E inherits Window {
|
|
Wrapper {
|
|
foo => { debug("hello"); }
|
|
// ^error{Can't assign a local callback handler to an alias to a global callback}
|
|
}
|
|
} |