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

Shader editor: undefined function called with argument(s) error reads "Too many arguments" instead of "undefined function" #72120

Closed
hsandt opened this issue Jan 26, 2023 · 0 comments · Fixed by #79459

Comments

@hsandt
Copy link
Contributor

hsandt commented Jan 26, 2023

Godot version

v4.0.beta13.official [caacade]

System information

Linux Ubuntu 20.04 with Unity desktop

Issue description

When calling an undefined function in the shader editor with argument(s), such as undefined_function(1), the error reads:

Too many arguments for "undefined_function()" call. Expected at most 0 but received 1.

instead of the expected:

No matching function found for: 'undefined_function'.

This is possibly a regression introduced in #18225, since the latter was focused on the arguments part.

To avoid such regression in the future, consider adding a unit test with this case (and, in fact, unit tests for the other signature errors too if there are not already).

Steps to reproduce

  1. Create a shader resource and open the shader editor
  2. Enter undefined_function(1); in the fragment() definition

Minimal reproduction project

N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants