// Copyright © SixtyFPS GmbH <info@slint.dev>
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-1.2 OR LicenseRef-Slint-commercial

global MyType := {
    property <int> aaa;
    property <int> aaa;
//                 ^error{Cannot override property 'aaa'}
    property <int> bbb : 42;
    property <string> ccc;

    ccc: "hello";
    animate bbb { duration: 100ms; }
//  ^error{A global component cannot have animations}
    states [ ]
//  ^error{A global component cannot have states}
    transitions [ ]
//  ^error{A global component cannot have transitions}
    @children
//  ^error{A global component cannot have sub elements}
    Rectangle { }
//  ^error{A global component cannot have sub elements}
    for x in mod : Text { }
//  ^error{A global component cannot have sub elements}
//           ^^error{Builtin function must be called}
    aaa <=> bbb;

    property <int> eee <=> aaa;

    qqq: 42;
//  ^error{Unknown property qqq}

}

export SuperSimple := Rectangle {
    MyType {
//  ^error{Cannot create an instance of a global component}
        ccc: "hello";
    }
}
