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

Static typing doesn't doesn't recognise class_type properly for purpose of Auto-completion #27349

Closed
Feniks-Gaming opened this issue Mar 23, 2019 · 2 comments
Labels

Comments

@Feniks-Gaming
Copy link
Contributor

Godot version:
3.1 Steam

OS/device including version:
Windows 10

Issue description:
When I use class_name to create a class for Enemy engine doesn't recognised build in functions of it's parent for purpose of auto-completion

My Enemy is:

extends KinematicBody2D
class_name Enemy

However when I later try to do

func update(host: Enemy, delta):
var collision = host.move_and_collide(host.velocity * delta)

auto completion is not working as intended. I can type

host.

and any function I have created will be completed

but if I type host.move_and it will not auto-complete to move_and_slide when typed by hand it will work fine but auto-completion is not recognising it.

Steps to reproduce:

Call a class from other script and try to type any of parent class functions

Minimal reproduction project:

Go open scene enemy "res://Characters/Enemies/Enemy.tscn" container open script "res://Characters/Enemies/States/Calm.gd" and under function func update(host: Enemy, delta): try to type host. and then any of KinematicBody2d methods and you will see autocomplition not working.

Then try typing host. and any of enemy.gd methods and you will see all of them working.

First Game - Copy.zip

@NetroScript
Copy link

Probably the same issue as #27152

@Calinou
Copy link
Member

Calinou commented Mar 29, 2019

Duplicate of #27152.

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