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

Autocomplete no longer recognizes type under if-block checked by 'is' #21915

Closed
ghost opened this issue Sep 9, 2018 · 2 comments
Closed

Autocomplete no longer recognizes type under if-block checked by 'is' #21915

ghost opened this issue Sep 9, 2018 · 2 comments

Comments

@ghost
Copy link

ghost commented Sep 9, 2018

Godot version:

af290f7

OS/device including version:

Linux

Issue description:

A type's autocompletion would appear under an if-block when that object's type has been checked; for a common example:

func _input(event):
    if event is InputEventKey:
        event.

In 3.0.6, autocomplete would give you this:
image

Post-typed gdscript, this no longer works; the autocompletion for event under the if-block just displays the following:
image

Using typed gdscript, autocomplete works fine outside of the if-block (albeit just for the base class):

func _input(event : InputEvent) -> void:
    event.
    if event is InputEventKey:

image

But inside the if-block, again, it displays new and some constants.

As of right now, it's necessary for the user to cast event before autocomplete will appear:

var key = event as InputEventKey
if key:
@akien-mga
Copy link
Member

CC @vnen

@vnen vnen self-assigned this Sep 10, 2018
@ghost
Copy link

ghost commented Sep 15, 2018

Been noticing this as well. Wasn't sure about it though, since I had some other auto-completion issue.

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

No branches or pull requests

2 participants