Skip to content

Godot 4.3 beta 1 Parser Errors that don't appear in Godot 4.2.2 #92780

@svendixon

Description

@svendixon

Tested versions

Godot 4.3 beta 1

System information

Windows 11, Vulkan, GTX 980 Ti (545.84)

Issue description

An autoload "PreloadedScenes.gd" that preloads a scene "some_node.tscn".

extends Node
const SOME_NODE := preload("res://some_node.tscn")

"some_node.tscn" has an attached script with a custom class name and var of type "Game" which is another custom class name for the game scene.

class_name SomeNode
extends Node
var game : Game

The game scene instantiates "some_node". Gives the error: Parser Error: Could not resolve member "SOME_NODE".

class_name Game
extends Node2D
var some_node := PreloadedScenes.SOME_NODE.instantiate() as SomeNode

Even when preloading it directly, it gives the error: Parser Error: Could not preload resource file "res://some_node.tscn".

class_name Game
extends Node2D
var some_node := preload("res://some_node.tscn").instantiate() as SomeNode

I'm not an experienced programmer so I'm unsure what is happening here. I assume this is a cyclic reference problem that Godot 4.2.2 was able to deal with but Godot 4.3 beta 1 no longer can?

Steps to reproduce

Open the minimal reproduction project and run it.

If you open it in 4.2.2, it will run. If you open it in 4.3 beta 1, it will error.

Minimal reproduction project (MRP)

SomeNode.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Release Blocker

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions