Skip to content

Add runtime checks for the statements which can be optimized to true or false #1243

@sgrekhov

Description

@sgrekhov

We have some checks like

  Expect.isTrue(c is Object);

These statements are optimized by dart2js to Expect_isTrue(true);. Most probably, these statements are optimized in the similar way by AOT. We need to add some runtime checkings here to test not only compiler optimizations but the runtime as well.

To do that find all of the tests that have analyzer hints like hint - Unnecessary type check; the result is always 'true'. and add some runtime checks

Metadata

Metadata

Assignees

Labels

type-enhancementA request for a change that isn't a bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions