#123575·godot

object.set() fails to update TypedDictionary variable to Dictionary without Warning or Error

Author: diklorCreated Sep 17, 2026Updated Sep 17, 2026

Tested versions

  • Reproducible in 4.8dev5 [9552dfb68], 4.7.1stable

System information

Godot v4.8.dev5 - Windows 10 (build 19045)

Issue description

When attempting to assign a standard Dictionary to a TypedDictionary variable using object.set(), the typed variable retains its previous value. No warnings or errors are reported in the console, making the issue difficult to diagnose

Steps to reproduce

  1. Create a new GDScript file attached to a Node
  2. Declare a typed dictionary variable: var typed_dict: Dictionary[int, String] = {}
  3. Create a new Dictionary variable and assign it using set()
extends Node

var typed_dict: Dictionary[int, String] = {}

func _ready() -> void:
    var new_dict: Dictionary = {}
    new_dict = 'test'

    self.set('typed_dict', new_dict)
    print('Typed dict after change: ', typed_dict) # typed_dict is still {}

But this works properly:

extends Node

var typed_dict: Dictionary = {}
var typed_dict2: Dictionary[int, String] = {}

func _ready() -> void:
    var new_dict: Dictionary[int, String] = { 1: 'test' }
    self.set('typed_dict', new_dict)  # OK
    print('Dictionary to Dictionary[int, String]: ', typed_dict == new_dict)  # true

    var new_dict2: Dictionary[int, String] = { 1: 'test' }
    self.set('typed_dict2', new_dict2)  # OK
    print('Dictionary[int, String] to Dictionary[int, String]: ', typed_dict2 == new_dict2)  # true

The typed_dict variable should at minimum log a warning or error, indicating that the assignment failed due to type mismatch.

This issue has caused considerable debugging time (one week) due to the absence of runtime feedback :((

Minimal reproduction project (MRP)

typed_dictionary_silent_bug.zip