You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
https://dart-review.googlesource.com/c/sdk/+/314500 refactors several places in the SDK to avoid having the build fail due to "unnecessary !" warnings when we enable the language feature inference-update-2 (which provides support for promotion of final private fields). For example, it changes:
DirectorycreateDirectory(String path) {
if (_createDirectory !=null) return_createDirectory!(path);
if (_previous !=null) return _previous!.createDirectory(path);
returnsuper.createDirectory(path);
}
to
DirectorycreateDirectory(String path) {
if (_createDirectory !=null) return_createDirectory!(path);
var previous = _previous;
if (previous !=null) return previous.createDirectory(path);
returnsuper.createDirectory(path);
}
After interface-update-2 has been enabled, we should consider refactoring this to:
DirectorycreateDirectory(String path) {
if (_createDirectory !=null) return_createDirectory!(path);
if (_previous !=null) return _previous.createDirectory(path);
returnsuper.createDirectory(path);
}
(note the absence of the ! in _previous.createDirectory).
The text was updated successfully, but these errors were encountered:
https://dart-review.googlesource.com/c/sdk/+/314500 refactors several places in the SDK to avoid having the build fail due to "unnecessary
!
" warnings when we enable the language featureinference-update-2
(which provides support for promotion of final private fields). For example, it changes:to
After
interface-update-2
has been enabled, we should consider refactoring this to:(note the absence of the
!
in_previous.createDirectory
).The text was updated successfully, but these errors were encountered: