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

Simple compiler bug #3130

Open
deltamolfar opened this issue Aug 22, 2024 · 1 comment
Open

Simple compiler bug #3130

deltamolfar opened this issue Aug 22, 2024 · 1 comment
Labels

Comments

@deltamolfar
Copy link
Contributor

deltamolfar commented Aug 22, 2024

Describe the bug
Compiler bug

To Reproduce
Attempt to call nil lambda.

@persist A:function

A()

Expected behavior
Verbose error

Error message
sv: Expression 2 (generic): Internal error 'addons/wire/lua/entities/gmod_wire_expression2/base/compiler.lua:1884: attempt to index local 'f' (a nil value)' at line 3, char 1

@Vurv78
Copy link
Contributor

Vurv78 commented Sep 1, 2024

It is intentional to avoid overhead with the nil check since the error is harmless. That would ideally be a compile error since the variable isn't initialized though.

No functions should give you a nil lambda

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

No branches or pull requests

3 participants