Skip to content

[4.x regression] AutoLoad scenes (not scripts) do not support implicit types #61386

@nathanfranke

Description

@nathanfranke

Godot version

v4.0.alpha.custom_build [19e3c7f]

Not reproducible in 3.4.4

System information

Arch on 5.15.41-1-lts

Issue description

var x := Test.hello gives error, could not infer the type of variable "x"

Steps to reproduce

  1. test.gd:

    extends Node
    
    var hello := "world"
    

    scene.gd:

    extends Node
    
    func _ready() -> void:
    	var x := Test.hello
    

    test.tscn - Empty scene with test.gd, add as singleton.

    scene.tscn - Empty scene with scene.gd, set as main scene.

  2. Notice the GDScript error in scene.gd.

Minimal reproduction project

3.4.4 (no reproducible): test1.zip
4.x (reproducible): test2.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions