yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

Tim FoleyDiagnose attempts to call instance methods from static methods (#1330)58904b58b

master
313 B21 linesraw
1// call-instance-from-static.slang
2
3// Test that calling an instance method from a static method is an error.
4
5//DIAGNOSTIC_TEST:SIMPLE:-target hlsl -entry main -stage compute
6
7struct Test
8{
9	void instanceMethod()
10	{}
11
12	static void staticMethod()
13	{
14		instanceMethod();
15	}
16}
17
18void main()
19{
20	Test.staticMethod();
21}