slint/internal/compiler/tests/syntax/focus/focus_invalid.slint
Simon Hausmann 7ce0bd493a Fix panic when using foward-focus with non-element binding
Since commit 6fefe75a1c the handling
of forward-focus bindings happens before the resolve_expressions pass,
which means that we cannot rely on type mismatch
error handling yet.

Fixes #4475
2024-01-30 10:09:07 +01:00

12 lines
387 B
Text

// Copyright © SixtyFPS GmbH <info@slint.dev>
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-1.1 OR LicenseRef-Slint-commercial
export X := Rectangle {
forward-focus: nothingness;
// ^error{Unknown unqualified identifier}
}
export Y := Rectangle {
forward-focus: true;
// ^error{Cannot convert bool to element ref}
}