Skip to content

Conversation

@ArshPanesar
Copy link
Contributor

@ArshPanesar ArshPanesar commented Jun 8, 2022

When assigning 'export var' to preload, the class_name for export property was not bieng set in the _parse_class() function, which caused the export's native type to be mistaken as Object when using _type_from_property() function:

_type_from_property(PropertyInfo p_property, ...)
{ 
        DataType ret;
        ...
        // class_name is not set, so native_type = "Object"
        ret.native_type = p_property.class_name == StringName() ? "Object" : p_property.class_name;
        ...
        return ret;
}

This caused a parse error when used in a script.

Setting class_name for export property in _parse_class() removed the parse error.

Fixes #61752

When assigning 'export var' to preload, the class_name for export
property was not bieng set in the _parse_class() function, which caused
the  export's native type to be mistaken as Object when using
_type_from_property() function. This caused a parse error when used in
a script.

Setting class_name for export property in _parse_class() removed the
parse error.

Fixes Issue godotengine#61752
@ArshPanesar ArshPanesar requested a review from a team as a code owner June 8, 2022 13:19
@ArshPanesar ArshPanesar changed the title Fixed export var inferring wrong type of preload [3.x] Fixed export var inferring wrong type of preload Jun 8, 2022
@akien-mga akien-mga added this to the 3.x milestone Jun 8, 2022
@akien-mga akien-mga added the cherrypick:3.5 Considered for cherry-picking into a future 3.5.x release label Jun 8, 2022
@akien-mga akien-mga modified the milestones: 3.x, 3.6 Dec 12, 2022
@lawnjelly lawnjelly modified the milestones: 3.6, 3.7 Sep 11, 2024
@AThousandShips AThousandShips changed the title [3.x] Fixed export var inferring wrong type of preload [3.x] Fix export var inferring wrong type of preload Sep 12, 2024
@akien-mga akien-mga removed the cherrypick:3.5 Considered for cherry-picking into a future 3.5.x release label Jun 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: PRs for 3.6 beta 1

Development

Successfully merging this pull request may close these issues.

3 participants