Skip to content

get_debug_type() and ::class of a Generator held in a mixed slot answer an empty name. #588

Closed

Description

@blacktrs

Summary

get_debug_type() and ::class of a Generator held in a mixed slot answer an empty name.

Repro

<?php
function g(): \Generator { yield 1; }
function t(mixed $m) { return get_debug_type($m) . '|' . gettype($m) . '|' . (is_object($m) ? $m::class : '-'); }
echo t(g()), "\n";

Expected (php)

Generator|object|Generator

Actual (manticore 78e96450, Darwin arm64)

|object|

Tracking

Known-bug repro: tests/aot/repro/wrong/generator_class_name_through_mixed.php — bash tests/aot/xfail.sh -k generator_class_name_through_mixed reports XFAIL while this is open and XPASS once it is fixed; then move the repro into tests/aot/cases/ and close this issue.

Activity

  1. added
    bug
    wrong-answer
    on Nov 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugwrong-answer

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions