slint/internal/compiler/tests/syntax/callbacks/init.slint
Tobias Hunger bbdd6aeab7 compiler: Ignore leading whitespace when parsing
... and update all out test cases accordingly.
2023-04-26 17:22:13 +02:00

14 lines
423 B
Text

// Copyright © SixtyFPS GmbH <info@slint-ui.com>
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-commercial
global Singleton := {
callback init;
// ^error{A global component cannot have an 'init' callback}
init => { debug("nope"); }
// ^error{A global component cannot have an 'init' callback}
}
export Test := Rectangle {
callback init;
// ^error{Cannot override callback 'init'}
}