Null message error on build-time assert #47994
Labels
area-front-end
Use area-front-end for front end / CFE / kernel format related issues.
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
At runtime, including either an implicit or an explicit null assert message seems to behave correctly. In other words, both of these work as expected:
However, at build-time, asserts with an explicit null message will fail. I discovered this when I was building the following micro-library intended to make it easier for us to use build-time asserts;
https://github.com/cmc5788/global_assert#why-not-allow-an-assert-without-a-message
https://pub.dev/packages/global_assert
A minimal reproduction sample is as follows;
Compiling this will fail with:
Dart SDK version: 2.15.0-268.18.beta (beta) (Wed Nov 17 11:39:23 2021 +0100) on "macos_x64"
The text was updated successfully, but these errors were encountered: