xref: /aosp_15_r20/external/skia/resources/sksl/errors/UnassignedOutParameter.rts (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1*c8dee2aaSAndroid Build Coastguard Workerstruct S { float2 value; };
2*c8dee2aaSAndroid Build Coastguard Worker
3*c8dee2aaSAndroid Build Coastguard Workervoid testIn(in float2 a, in float2 b, in float2 c)             { a = float2(1); }
4*c8dee2aaSAndroid Build Coastguard Workervoid testOut(out float2 a, out float2 b, out float2 c)         { a = float2(1); }
5*c8dee2aaSAndroid Build Coastguard Workervoid testInout(inout float2 a, inout float2 b, inout float2 c) { a = float2(1); }
6*c8dee2aaSAndroid Build Coastguard Worker
7*c8dee2aaSAndroid Build Coastguard Workervoid testSIn(in S a, in S b, in S c)             { a.value = float2(1); }
8*c8dee2aaSAndroid Build Coastguard Workervoid testSOut(out S a, out S b, out S c)         { a.value = float2(1); }
9*c8dee2aaSAndroid Build Coastguard Workervoid testSInout(inout S a, inout S b, inout S c) { a.value = float2(1); }
10*c8dee2aaSAndroid Build Coastguard Worker
11*c8dee2aaSAndroid Build Coastguard Workervoid func(float2 p) {
12*c8dee2aaSAndroid Build Coastguard Worker    testIn(p, p, p);
13*c8dee2aaSAndroid Build Coastguard Worker    testOut(p, p, p);
14*c8dee2aaSAndroid Build Coastguard Worker    testInout(p, p, p);
15*c8dee2aaSAndroid Build Coastguard Worker
16*c8dee2aaSAndroid Build Coastguard Worker    S s;
17*c8dee2aaSAndroid Build Coastguard Worker    testSIn(s, s, s);
18*c8dee2aaSAndroid Build Coastguard Worker    testSOut(s, s, s);
19*c8dee2aaSAndroid Build Coastguard Worker    testSInout(s, s, s);
20*c8dee2aaSAndroid Build Coastguard Worker}
21*c8dee2aaSAndroid Build Coastguard Worker
22*c8dee2aaSAndroid Build Coastguard Worker/*%%*
23*c8dee2aaSAndroid Build Coastguard Workerfunction 'testOut' never assigns a value to out parameter 'b'
24*c8dee2aaSAndroid Build Coastguard Workerfunction 'testOut' never assigns a value to out parameter 'c'
25*c8dee2aaSAndroid Build Coastguard Workerfunction 'testSOut' never assigns a value to out parameter 'b'
26*c8dee2aaSAndroid Build Coastguard Workerfunction 'testSOut' never assigns a value to out parameter 'c'
27*c8dee2aaSAndroid Build Coastguard Worker*%%*/
28