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

GDScript: "Cannot find property emit on base Signal" #82251

Closed
MewPurPur opened this issue Sep 24, 2023 · 5 comments · Fixed by #82264
Closed

GDScript: "Cannot find property emit on base Signal" #82251

MewPurPur opened this issue Sep 24, 2023 · 5 comments · Fixed by #82264

Comments

@MewPurPur
Copy link
Contributor

MewPurPur commented Sep 24, 2023

Godot version

Godot v4.2.dev5 - Pop!_OS 22.04 LTS - X11 - Vulkan (Forward+) - integrated Intel(R) Graphics (ADL GT2) () - 12th Gen Intel(R) Core(TM) i5-1235U (12 Threads)

System information

Godot v4.2.dev5 - Pop!_OS 22.04 LTS - X11 - Vulkan (Forward+) - integrated Intel(R) Graphics (ADL GT2) () - 12th Gen Intel(R) Core(TM) i5-1235U (12 Threads)

Issue description

extends Node

signal lmofa
signal yeet

func _ready():
    lmofa.connect(yeet.emit)

This results in a "Cannot find property emit on base Signal" error. This is either a bug or a weird error text.

Steps to reproduce

Copy the script above.

Minimal reproduction project

N/A

@AThousandShips
Copy link
Member

Probably because the method is vararg, unsure if you can get a callble to that

@dalexeev
Copy link
Member

This is not a bug, but a limitation. A Callable can only represent Object methods and CustomCallables (for example lambdas in GDScript). Callable cannot represent methods of built-in Variant types.

@MewPurPur
Copy link
Contributor Author

MewPurPur commented Sep 24, 2023

Cool, so better error text, and/or the limitation is going to get lifted eventually?

@AThousandShips
Copy link
Member

Unsure what the error detection could do with the partsed/analyser

@dalexeev
Copy link
Member

I'll try to implement a CutomCallable for built-in Variant types.

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