Revision e6dc9a9eed58bdfd9c6f4016864acfe60381f927 authored by Yong He on 27 October 2022, 20:08:45 UTC, committed by GitHub on 27 October 2022, 20:08:45 UTC
1 parent 79af29a
Raw File
smoke.slang
//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;
    
}
back to top