Skip to content

$this incorrectly detected inside object creation expression #2618

@przepompownia

Description

@przepompownia

image

The case

        return new Success((function () {
            $classes = $this;
        })());

exists for example in lib/CodeTransform/Adapter/WorseReflection/Transformer/ImplementContracts.php.

It's a regression after #2469 @mamazu

Perhaps similar caution will be needed in #2613

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions