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

Autocompletion and type/method signature checking does not work after the second degree inside of an is block #101483

Open
Synzorasize opened this issue Jan 13, 2025 · 1 comment

Comments

@Synzorasize
Copy link
Contributor

Tested versions

v4.4.dev7.official [46c8f8c]
master [5b52b4b]

System information

Godot v4.4.dev7 - Fedora Linux 41 (KDE Plasma) on Wayland - X11 display driver, Multi-window, 1 monitor - Vulkan (Forward+) - integrated Intel(R) UHD Graphics 620 (KBL GT2) - Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz (8 threads)

Issue description

When using object is [class name], autocompletion does not work after the second degree property/method access, and neither does type/method signature checking.

Example:

var node3d := Node3D.new()
# Gives argument error. (Correct)
node3d.position.direction_to()
node3d.quaternion.angle_to()
# Gives no error. (Correct)
var x := node3d.basis.inverse().x
var y := node3d.transform.origin.y

var node: Node = Node3D.new()
if node is Node3D:
	# No error. (Incorrect)
	node.position.direction_to()
	node.quaternion.angle_to()
	# Gives inferred as Variant error. (Incorrect)
	var x2 := node.basis.inverse().x
	var y2 := node.transform.origin.y

Steps to reproduce

Inside an is block (use any subclass), access a property/method that returns a math/collection/Object type Variant from that subclass, then access a property/method of that returned type. No autocompletion will appear for the third degree, and no type/argument checking will work for the second degree. When assigned to an variable, it will be inferred as Variant instead of what the property/method returns.

Minimal reproduction project (MRP)

autocompletion-is-issue.zip (same code as above)

@Synzorasize
Copy link
Contributor Author

It looks like #84264 fixed the autocompletion aspect, but the type/method signature check is still broken.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: For team assessment
Development

No branches or pull requests

2 participants