This is a meta-issue summarizing breaking changes made as part of realizing the null safety feature.
We are planning on landing these breaking changes fairly soon, and this in advance of the full null safety feature to ensure that we have sufficient time to uncover any unanticipated consequences.
Please comment on the issues list below if you expect these changes to cause severe problems for your code.
- type system
- #40633: Types objects will now be normalized
- #40633: Subtyping of type bounds in function types will switch from using structural subtyping to use mutual subtyping.
- #40675: Type inference for local variables will not use promoted type variables.
- #40674: The
RuneIterator class has some members which return
null in the state where the iterator has no "current" element; they will now return -1 or an empty string
- #40678: The
int.fromEnvironment const constructors will have a non-
defaultValue default value.
- #40317: We will make the platform TypeError class not extend/implement the AssertionError class.
That will also make it not inherit the message getter.
- #40681: The
runZoned method will now not catch synchronously thrown errors even when given an error handler.
- #40676: The
StreamSubscription.cancel method's return type is changed to
- #40683: We disallow throwing nullable values entirely, and methods which accept thrown objects requires non-null arguments. This includes methods accepting async errors.
- #40130: We will replace a null stack trace supplied by users with a default stack trace.
- #40483: The Process class will throw specific exceptions rather than throwing
- #40702: Destroyed/Upgraded Sockets now throw when accessing socket options
- #40706: Provide epoch timestamps in the FileStat notFound object
- #40709: HeaderValue parses invalid parameters as empty string instead of null