summaryrefslogtreecommitdiffstats
path: root/tests/diagnostics/interfaces/interface-override.slang
blob: 12539895b199f04183489afbe2400b25d1da9206 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK):

interface IBase
{
    int f();
}

interface IDerived : IBase
{
    //CHECK-DAG: ([[# @LINE+1]]): error 30311:
    __init() {}

    property int value{
        get;

        //CHECK-DAG: ([[# @LINE+1]]): error 30311:
        set{ }
    }

    __subscript(int index)->int
    {
        //CHECK-DAG: ([[# @LINE+1]]): error 30311:
        get{}
    }

    //CHECK-DAG: ([[# @LINE+1]]): error 30312:
    override int f() {}
}