Skip to content

Autocompletion fails if script's property is assigned from undefined type #107714

Closed as duplicate of#92566
@KoBeWi

Description

@KoBeWi

Tested versions

4.5 beta1
4.4.1

System information

W10

Issue description

When you have a custom property and then assign it from some method that returns Variant, editor suddenly forgets its type.

godot.windows.editor.dev.x86_64_71nmR7w3rc.mp4

Steps to reproduce

  1. Paste this code in script editor:
extends Node

var item_list: ItemList
var node2d: Node2D

func _ready() -> void:
	node2d = item_list.get_item_metadata(0)
	node2d.
	
	pass
  1. Try to autocomplete from node2d.
  2. Comment the above line and try again

Minimal reproduction project (MRP)

N/A

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions