Skip to content

assert_connected does not work with anonymous functions #786

@bitwes

Description

@bitwes

Versions

(list all versions where you have replicated the bug)

  • Godot: 4.5.1
  • GUT: 9.5.1
  • OS: MacOS

The Bug

The following test fails:

func test_demo_issue():
	var btn = autofree(Button.new())
	var f = func(): print('hello')
	btn.pressed.connect(f)
	assert_connected(btn.pressed, f)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions