summaryrefslogtreecommitdiffstats
path: root/tests/language-server/smoke.slang
blob: 1949025866530201ae266e6ac30413fe56cd8290 (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
29
30
31
32
33
//TEST(smoke):LANG_SERVER:
//COMPLETE:31,21
//HOVER:25,30
//SIGNATURE:25,40
interface IFoo
{
    /**
    Returns the sum of the contents.
    */
    int getSum();
}

struct MyType : IFoo
{
    int getSum() { return 0; }
}

struct Pair<T:IFoo, U: IFoo> : IFoo
{
    T first;
    U second;
    /**
    Returns the sum of the contents.
    */
    int getSum() { return first.getSum() + second.getSum(); }
}

void m()
{
    Pair<MyType, Pair<MyType, MyType>> v;
    v.first = v.second.first;
    
}