-
Notifications
You must be signed in to change notification settings - Fork 632
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #5220
- Loading branch information
Showing
2 changed files
with
53 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
internal/compiler/tests/syntax/functions/functions_purity_recursive_5220.slint
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Copyright © SixtyFPS GmbH <info@slint.dev> | ||
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-1.2 OR LicenseRef-Slint-commercial | ||
|
||
export component App inherits Window{ | ||
background: blue; | ||
// ^error{'blue' must be called} | ||
// ^^error{Cannot convert function\(\) -> color to brush} | ||
function blue()->color { | ||
// ^error{The binding for the property 'blue' is part of a binding loop} | ||
// ^^error{Cannot convert function\(\) -> color to color} | ||
|
||
blue | ||
// ^error{'blue' must be called} | ||
} | ||
|
||
|
||
|
||
in property <int> abc: get_abc1(); | ||
function get_abc1() -> int { return get_abc2(); } | ||
// ^error{The binding for the property 'get-abc1' is part of a binding loop} | ||
function get_abc2() -> int { return get_abc1(); } | ||
// ^error{The binding for the property 'get-abc2' is part of a binding loop} | ||
|
||
} | ||
|