Skip to content

[kernel] Infinite loop when testing if two record types are equivalent #52817

Closed
@nshahan

Description

@nshahan

DDC relies on the kernel implementation of DartTypeEquivalence to determine if some casts can be elided or replaced as null checks.

Some instances of record types can cause an infinite loop when checking if they are equivalent.

Originally reported here: flutter/flutter#129482

This code will cause the DDC compiler to hang:

main() {
  Object value = 'x';
  (a: 'a', b: value) as ({String a, String b});
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions