oizma / angleproject

Automatically exported from code.google.com/p/angleproject
Other
0 stars 0 forks source link

GLSL, A variable with the same name as a function does not cause an error or hide the function #22

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Make a shader something like this

float foo(float a, float b) {
 return a * b;
}

void main () {
 float foo = 1.0;
 float a = 2.0;
 float b = 3.0;
 float bar = foo(a, b);
 ..
}

2. Compile it

What is the expected output? 

Either (a) I should get an error for foo exiting twice or (b) the function call 
to "foo" should fail because at that scope, "foo" is not a function.

What do you see instead?

The code passes the validator.

Original issue reported on code.google.com by g...@chromium.org on 2 Aug 2010 at 5:20

GoogleCodeExporter commented 9 years ago

Original comment by alokp@chromium.org on 5 Aug 2010 at 8:30

GoogleCodeExporter commented 9 years ago
Fixed in r375.

Original comment by alokp@chromium.org on 9 Aug 2010 at 5:17