Skip to content

Names of the variable patterns mismatch the names of captured variables #1647

@chloestefantsova

Description

@chloestefantsova

In a patterns test a name of the pattern variable b doesn't match the name a of the variable used in the body after the match.

case ({1: String b}):
a.expectStaticType<Exactly<String>>();
return "{1: <String>$a}";

Similarly, in other lines of the same file:

({1: String b}) => "{1: <String>$a}",

if (m case ({1: String b})) {
a.expectStaticType<Exactly<String>>();
return "{1: <String>$a}";

Metadata

Metadata

Assignees

Labels

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

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions