Skip to content

language_2/extension_methods/static_extension_internal_resolution_2_test.dart #37791

@bwilkerson

Description

@bwilkerson

I need some clarification to understand this test.

On line 110, the test contains the following line:

this.setterInGlobalScope = globalValue;

If I understand correctly, the reference to this.setterInGlobalScope should resolve to the setter defined in the extension (set setterInGlobalScope(bool x)), and as far as I can tell, the reference to globalValue can only resolve to the global variable (const int globalValue = 0;). Those two have incompatible types, so I would expect an error here, but the test doesn't expect any error.

The same logic appears to apply on line 160:

self.setterInGlobalScope = globalValue;

where self has the type A, the same as this.

@leafpetersen

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-testCross-cutting test issues (use area- labels for specific failures; not used for package:test).

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions