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

Function argument's default value not display in tooltips/documents when it's Array/Dictionary #63018

Closed
Xwdit opened this issue Jul 15, 2022 · 3 comments · May be fixed by #62994
Closed

Function argument's default value not display in tooltips/documents when it's Array/Dictionary #63018

Xwdit opened this issue Jul 15, 2022 · 3 comments · May be fixed by #62994

Comments

@Xwdit
Copy link
Contributor

Xwdit commented Jul 15, 2022

Godot version

4.0.alpha12

System information

Windows11, Nvidia RTX 2060, Vulkan

Issue description

In the current version, if the default value of a GDScript function arguments is set to an array or dictionary, it will be null in tooltips and documentation.

Steps to reproduce

Just look at the script document and the tooltip when calling the fn function, the default value won't show/is null:

func fn(x = [], y = {}):
	return

Minimal reproduction project

func fn(x = [], y = {}):
	return
@akien-mga
Copy link
Member

Still reproducible in 4.0 RC 2.

@akien-mga akien-mga modified the milestones: 4.0, 4.1 Feb 16, 2023
@adamscott adamscott modified the milestones: 4.1, 4.2 Jun 16, 2023
@adamscott
Copy link
Member

Post-poned to 4.2, see my comment for details.

@dalexeev dalexeev modified the milestones: 4.2, 4.3 Oct 27, 2023
@dalexeev
Copy link
Member

dalexeev commented Jun 4, 2024

In the current version, if the default value of a GDScript function arguments is set to an array or dictionary, it will be null in tooltips and documentation.

This is mostly fixed by the following PRs:


For complex expressions, an ellipsis is displayed, but we can increase the maximum recursion level if necessary:

@dalexeev dalexeev closed this as completed Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

5 participants