godotengine / godotengine/godot

4.4 Dev 3. Inbuilt functions that return dictionaries do not return a correct fully typed dictionary.

Open
#97,808 8 comments 1 reaction 0 assignees View on GitHub
breaks compat discussion enhancement topic:core topic:gdscript
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

Reproducible in v4.4.dev3.official [f4af8201b]

### System information

Godot v4.4.dev3 - Windows 10.0.22631 - Single-window, 2 monitors - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 4090 (NVIDIA; 32.0.15.6109) - 13th Gen Intel(R) Core(TM) i7-13700K (24 threads)

### Issue description

I am sure maintainers may already be aware but currently inbuilt functions such as `get_datetime_dict_from_system` does not return a correctly typed dictionary, but instead returns `Dictionary[Variant, Variant]` when I believe this one in particular should be `Dictionary[String, Variant]`.

### Steps to reproduce

Try and do something like:

`var time: Dictionary[String, Variant] = Time.get_datetime_dict_from_system()`.

### Minimal reproduction project (MRP)

N/A

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the typed assignment with Time.get_datetime_dict_from_system() in Godot v4.4.dev3, then trace the built-in declaration and type metadata for this function. Done means the function returns a correctly typed Dictionary[String, Variant] and the relevant behavior is covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers, game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.