Don Olmstead
2015-10-28 23:05:20 UTC
On the Slack channel we found out how to enable Strong Mode with the newest
dev channel from directions on https://pub.dartlang.org/packages/analyzer.
It definitely is complaining a lot more with Dart code which is fine by me.
The real question I wanted to ask is how aggressively should we be posting
bugs about strong mode? I enabled strong mode and the following code popped
up as a warning.
var metadata = await readMetadata(); // This returns a Map<String,
List<String>>
metadata.forEach((id, parameters) {
translations[id] = new Translation(parameters); // Parameters is a
List<String>
});
If I add List<String> next to parameters then no warnings. Without it I get
`parameters (dynamic) will need runtime check to cast to type List<String>`
Map seems to be typed properly with
forEach, https://api.dartlang.org/133591/dart-core/Map/forEach.html, so I'm
guessing its a strong mode problem.
dev channel from directions on https://pub.dartlang.org/packages/analyzer.
It definitely is complaining a lot more with Dart code which is fine by me.
The real question I wanted to ask is how aggressively should we be posting
bugs about strong mode? I enabled strong mode and the following code popped
up as a warning.
var metadata = await readMetadata(); // This returns a Map<String,
List<String>>
metadata.forEach((id, parameters) {
translations[id] = new Translation(parameters); // Parameters is a
List<String>
});
If I add List<String> next to parameters then no warnings. Without it I get
`parameters (dynamic) will need runtime check to cast to type List<String>`
Map seems to be typed properly with
forEach, https://api.dartlang.org/133591/dart-core/Map/forEach.html, so I'm
guessing its a strong mode problem.
--
For other discussions, see https://groups.google.com/a/dartlang.org/
For HOWTO questions, visit http://stackoverflow.com/tags/dart
To file a bug report or feature request, go to http://www.dartbug.com/new
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
For other discussions, see https://groups.google.com/a/dartlang.org/
For HOWTO questions, visit http://stackoverflow.com/tags/dart
To file a bug report or feature request, go to http://www.dartbug.com/new
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.