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
{{ message }}
Repository navigation
Confusing type check error in VM in checked mode #2172
When run in the VM w/ checked mode, and via the Editor, generates this error:
Unhandled exception:
type 'Smi' is not a subtype of type 'String' of 'a'.
0. Function: '::add' url: 'file:///Users/sethladd/dart/optionaltypes/optionaltypes.dart' line:3 col:12
1. Function: '::main' url: 'file:///Users/sethladd/dart/optionaltypes/optionaltypes.dart' line:8 col:12
It is unclear and confusing what "Smi" is. It should read: "type 'int' is not a subtype of type 'String' of 'a'"
We should avoid Smi, Mint, and BigInt, which are implementation details. Dart has num, int, and double. Frog correctly warns that "int is not of type String" in this case.
Agreed, static warnings aren't runtime checks. However, I am concerned whenever we let implementation details bleed up to user facing messaging. Another example is when the VM talks about "GrowableArray" which is not in the spec nor in our api.dartlang.org docs. To the best of our efforts, we should hide implementation class names from user facing errors, or document these implementation names so users can track them down and not be surprised.
Activity
sethladd commentedon Mar 14, 2012
It is unclear what a Smi is. It's not in our docs.
sethladd commentedon Mar 14, 2012
We should avoid Smi, Mint, and BigInt, which are implementation details. Dart has num, int, and double. Frog correctly warns that "int is not of type String" in this case.
sethladd commentedon Mar 15, 2012
Agreed, static warnings aren't runtime checks. However, I am concerned whenever we let implementation details bleed up to user facing messaging. Another example is when the VM talks about "GrowableArray" which is not in the spec nor in our api.dartlang.org docs. To the best of our efforts, we should hide implementation class names from user facing errors, or document these implementation names so users can track them down and not be surprised.
Thanks for your help with this!
sethladd commentedon Mar 15, 2012
Thanks for the fix!
Update the pub version
[deps] rev ai, http, i18n, shelf, test, tools, vector_math, web, webk…