summaryrefslogtreecommitdiffstats
path: root/tests/language-feature/generics/struct-generic-value-param-import.slang
blob: 785b8146f27143277cb7455a8e473a341de1335a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// struct-generic-value-param-import.slang
//TEST_IGNORE_FILE:

// This file is used by `struct-generic-value-param.slang`,
// and also incidentally tests that a trailing `;` is optional
// for `struct` decalrations in Slang files, including
// any `import`ed code.

public interface IData {}

public struct Data<let kCount : int> : IData
{
    public int state;

    [mutating] public void doStuff()
    {
        state++;
    }
}