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
The doc defines the assert statement as being assert(expression), but the analyzer accepts an optional second argument. Is the omission an oversight, or should asserts in constructor initializers not allow a message?
I'm not sure if this tracking issue is for the experiment or the feature. If the former, I guess it's closable? If the latter, no, because we haven't decided if we want to commit to it, remove the flag, etc.
This is a Flutter-only experiment (which is why it's VM+analyzer only so far, and should perhaps also include the formatter). That is all it is at this point. There is no decision to make it a language feature yet, it's not implemented by DDC or dart2js, and unless the experiment is a success, it will eventually be removed again.
The exact conditions for considering it a success isn't set in stone, but it should add non-negligible value for the Flutter developers. If it isn't, then it's just not worth its own weight.
Activity
a14n commentedon Aug 24, 2016
Could the design document be made public?
lrhn commentedon Aug 24, 2016
My docs-fu is too weak, so I converted the design document it to a gist.
a14n commentedon Aug 24, 2016
thanks
bwilkerson commentedon Aug 24, 2016
The doc defines the assert statement as being
assert(expression), but the analyzer accepts an optional second argument. Is the omission an oversight, or should asserts in constructor initializers not allow a message?lrhn commentedon Aug 29, 2016
We are going to add the second "argument" to
assert, so keep it for now.dgrove commentedon Oct 20, 2016
@lrhn can you please provide an update?
dgrove commentedon Nov 11, 2016
@lrhn can you provide an update?
jmesserly commentedon Nov 11, 2016
FYI DDC issue #27809
munificent commentedon Dec 12, 2016
This is not a 1.50 feature, so kicking out of the milestone. (I think we accidentally got it confused with assert messages, which are in 1.50).
sethladd commentedon Apr 20, 2017
This is done, right? flutter has this turned on now.
[-]Assert in initializers experiment.[/-][+]Assert in initializers experiment[/+]munificent commentedon Apr 21, 2017
I'm not sure if this tracking issue is for the experiment or the feature. If the former, I guess it's closable? If the latter, no, because we haven't decided if we want to commit to it, remove the flag, etc.
jmesserly commentedon Apr 21, 2017
oh gosh, yeah. Also DDC doesn't implement it yet, which I think nowadays we want for new language features? (it's not hard to implement btw)
lrhn commentedon Apr 24, 2017
This is a Flutter-only experiment (which is why it's VM+analyzer only so far, and should perhaps also include the formatter). That is all it is at this point. There is no decision to make it a language feature yet, it's not implemented by DDC or dart2js, and unless the experiment is a success, it will eventually be removed again.
The exact conditions for considering it a success isn't set in stone, but it should add non-negligible value for the Flutter developers. If it isn't, then it's just not worth its own weight.
[-]Assert in initializers experiment[/-][+]Assert in initializers[/+][-]Assert in initializers[/-][+]Assert in initializers experiment[/+]munificent commentedon Oct 3, 2017
The experiment has graduated to a feature. Closing out this bug in favor of #30968.
sethladd commentedon Oct 3, 2017
Thanks for the help!