// Copyright © SixtyFPS GmbH // SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0 export component SuperSimple { property i1: @image-url("hello.png"); property path; property i2: @image-url(path); // ^error{@image-url must contain a plain path as a string literal} property i3: @image-url("/home/\{path}.png"); // ^error{@image-url must contain a plain path as a string literal, without any '\{}' expressions} property i4: @image-url("/home/" + path + ".png"); // ^error{Expected ')' or ','} property i5: @image-url(path + ".png"); // ^error{@image-url must contain a plain path as a string literal} property i6: @image-url; // ^error{Syntax error: expected '('} property i7: @image-url("foo", "bar"); // ^error{Expected 'nine-slice(...)' argument} property i8: @image-url("foo", xyz(abc)); // ^error{Expected 'nine-slice(...)' argument} property i9: @image-url("foo", nine-slice(abc)); // ^error{Expected number literal or ')'} property i10: @image-url("foo", nine-slice(1 2 3)); // ^error{Expected 1 or 2 or 4 numbers} property i11: @image-url("foo", nine-slice()); // ^error{Expected 1 or 2 or 4 numbers} property i12: @image-url("foo", nine-slice(1 2 3 4 5)); // ^error{Expected 1 or 2 or 4 numbers} property i13: @image-url("foo", nine-slice(1 2 foobar 4 5)); // ^error{Expected number literal or ')'} property i14: @image-url("foo", nine-slice); // ^error{Syntax error: expected '('} property i15: @image-url("foo", nine-slice,); // ^error{Syntax error: expected '('} property i16: @image-url("foo", nine-slice 42 42); // ^error{Syntax error: expected '('} property i17: @image-url("foo", nine-slice(1px)); // error reported later property i18: @image-url("foo", nine-slice(1%)); // error reported later property i19: @image-url("foo", nine-slice(1, 2)); // ^error{Arguments of nine-slice need to be separated by spaces} property i20: @image-url("foo", nine-slice(2 + 3 )); // ^error{Expected number literal or ')'} property i21: @image-url("foo", nine-slice(2 -3 )); // ^error{Expected number literal or ')'} property i22: @image-url("foo", nine-slice(-2)); // ^error{Expected number literal or ')'} property i22: @image-url("foo", nine-slice(123456789)); }