]> git.tdb.fi Git - libs/gl.git/blob - tests/glsl/return_type_conflict.glsl
Validate return types of overloaded functions
[libs/gl.git] / tests / glsl / return_type_conflict.glsl
1 #pragma MSP stage(vertex)
2 layout(location=0) in vec4 position;
3 void func();
4 vec4 func();
5 float func();
6 float func(float v);
7 void main()
8 {
9         gl_Position = position;
10 }
11
12 /* Expected error:
13 <test>:4: Conflicting return type 'vec4' for function 'func'
14 <test>:3: Previously declared as returning 'void'
15 <test>:5: Conflicting return type 'float' for function 'func'
16 <test>:3: Previously declared as returning 'void'
17 */