Breaking Change 54640: Fix pattern context type schema for cast patterns.

150 views
Skip to first unread message

Paul Berry

unread,
Jan 16, 2024, 11:58:03 AMJan 16
to anno...@dartlang.org
The pattern context type schema for cast patterns will be changed from Object? to _ (the unknown type), to align with the specification.

This is a minor correction to the compiler's type inference algorithm, and it's not expected to affect any user code in practice. However, it is theoretically possible that it will cause a breakage, by affecting the implicit types that are filled in by type inference.

More details can be found here: https://github.com/dart-lang/sdk/issues/54640.

If you have any concerns about this change, please leave comments in the linked issue.

Thank you!
Paul

Paul Berry

unread,
Jan 31, 2024, 1:18:26 PMJan 31
to anno...@dartlang.org
Reply all
Reply to author
Forward
0 new messages