i-slint-compiler 1.18.0

Internal Slint Compiler Library
Documentation
// Copyright © 2026 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>, author Nicholas Turner <nicholas.turner@kdab.com>
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0

export component Foo {
    in-out property <bool> foo;
    match foo {
        true: Rectangle { }
        false: Rectangle { }
    }
}

export component Bar {
    in-out property <int> foo;
    match foo {
        0: Rectangle { }
        1: Rectangle { }
        *: Rectangle { }
    }
}

export component Baz {
    in-out property <int> xx: 0;

    match xx {
        0: Rectangle { }
        1: Rectangle { }
        *: Rectangle { }
    }

    in-out property<int> yy: 5;

    match yy {
        2: Rectangle { }
        3: Rectangle { }
        *: Rectangle { }
    }
}

export component NegativeInt {
    in-out property <int> num: 0;
    match num {
        -5: Rectangle { }
        5: Rectangle { }
        *: Rectangle { }
    }
}

export component EmptyMatchElement {
    in-out property <int> xx: 0;
    match xx {
//  >error{Expected at least one case}

    }
//  <error{Expected at least one case}
    in-out property <int> yy: 20;
}