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

Add support for overloaded methods / functions #90

Open
davesmith00000 opened this issue Oct 1, 2023 · 0 comments
Open

Add support for overloaded methods / functions #90

davesmith00000 opened this issue Oct 1, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@davesmith00000
Copy link
Member

davesmith00000 commented Oct 1, 2023

This is valid GLSL, and Scala for that matter.

def mod289(x: vec3): vec3 =
  x - (floor(x * (1.0f / 289.0f)) * 289.0f)

def mod289(x: vec2): vec2 =
  x - (floor(x * (1.0f / 289.0f)) * 289.0f)

But Ultraviolet complains that the function is already declared:

mod289 is already defined as method mod289

Note that overloaded methods must all be defined in the same group of toplevel definitions
@davesmith00000 davesmith00000 added the enhancement New feature or request label Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant