xref: /aosp_15_r20/external/skia/tests/sksl/errors/TernaryMismatch.glsl (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1*c8dee2aaSAndroid Build Coastguard Worker### Compilation failed:
2*c8dee2aaSAndroid Build Coastguard Worker
3*c8dee2aaSAndroid Build Coastguard Workererror: 2: ternary operator result mismatch: 'bool', 'float'
4*c8dee2aaSAndroid Build Coastguard Workervoid bool_or_float()   { float x = 5 > 2 ? true : 1.0; }
5*c8dee2aaSAndroid Build Coastguard Worker                                           ^^^^^^^^^^
6*c8dee2aaSAndroid Build Coastguard Workererror: 3: ternary operator result mismatch: 'float3', 'float'
7*c8dee2aaSAndroid Build Coastguard Workervoid float3_or_float() { float x = 5 > 2 ? float3(1) : 1.0; }
8*c8dee2aaSAndroid Build Coastguard Worker                                           ^^^^^^^^^^^^^^^
9*c8dee2aaSAndroid Build Coastguard Workererror: 4: ternary expression of type 'void' is not allowed
10*c8dee2aaSAndroid Build Coastguard Workervoid void_or_void()    { 5 > 2 ? void_function() : void_function(); }
11*c8dee2aaSAndroid Build Coastguard Worker                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12*c8dee2aaSAndroid Build Coastguard Worker3 errors
13