Skip to content

[Dot Shorthands] Spreads have Iterable<..> context #3170

@kallentu

Description

@kallentu

co19/LanguageFeatures/Static-access-shorthand/non_ambiguity_A02_t06
co19/LanguageFeatures/Static-access-shorthand/non_ambiguity_A02_t05
co19/LanguageFeatures/Static-access-shorthand/non_ambiguity_A02_t04
co19/LanguageFeatures/Static-access-shorthand/non_ambiguity_A02_t03

For the tests above, we use spreads on dot shorthands, but they should produce an error because the context type of the operand of a spread element is Iterable<C> where C is the element type of the collection.
-- Meaning that when we're looking up the namespace for finding which static member to resolve to, we're looking in Iterable and these tests will produce an error.

Essentially, we'd need to change these to expect an error. The tests are still valuable to have to make sure we don't crash while parsing.

cc. @eernstg

Metadata

Metadata

Assignees

Labels

bad-testReport tests in need of updates. When closed, the tests should be considered good

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions