Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle redeclarations #98

Open
AbigailBuccaneer opened this issue Jul 10, 2015 · 0 comments
Open

Handle redeclarations #98

AbigailBuccaneer opened this issue Jul 10, 2015 · 0 comments
Assignees

Comments

@AbigailBuccaneer
Copy link
Collaborator

All variable names, structure type names, and function names in a given scope share the same name space. Function names can be redeclared in the same scope, with the same or different parameters, without error. An implicitly-sized array can be redeclared in the same scope as an array of the same base type. Otherwise, within one compilation unit, a declared name cannot be redeclared in the same scope; doing so results in a redeclaration compile-time error. If a nested scope redeclares a name used in an outer scope, it hides all existing uses of that name. There is no way to access the hidden name or make it unhidden, without exiting the scope that hid it.

GLSL 4.5 specification, §4.2 Scoping

We should detect redeclaration errors, as well as link valid declarations together.

@AbigailBuccaneer AbigailBuccaneer self-assigned this Jul 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant