Skip to content

LanguageFeatures/Patterns/type_inference_A31_t03 #1895

@alexmarkov

Description

@alexmarkov

This test expects that pattern Square(:final num areaAsNullable) doesn't match for Square(2):

case Square(:final num areaAsNullable):
return "match-2";

Expect.equals("no match", test1(Square(2)));

However, areaAsNullable from Square actually returns double , so it should match:

num? get areaAsNullable => areaAsDouble;

double get areaAsDouble => length * length;

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