summaryrefslogtreecommitdiffstats
path: root/tests/diagnostics/extension-visibility-a.slang
blob: 162320d510e3dfe1e51bbd64d67a71926b6a3e72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// extension-visibility-a.slang

public interface IThing
{
	public int getValue();
}

// Note: not implementing the interface here!
public struct MyThing
{
	public int value;
}

public int helper<T : IThing>(T thing)
{
	return thing.getValue();
}