commit | cb3f9405361ebedbbb852e51cf863620b6a9b2f6 | [log] [tgz] |
---|---|---|
author | Nate Bosch <nbosch1@gmail.com> | Sat Aug 29 12:10:28 2020 -0700 |
committer | GitHub <noreply@github.com> | Sat Aug 29 12:10:28 2020 -0700 |
tree | 3357c4c5a3cc3ad9943e33c86e86ee214dde3931 | |
parent | 166d3e07eabc8283c6137cfde17fb25b8bb40080 [diff] |
Fix cast of nullable argument (#112) The `as num` cast existed before the migration, but in the wrong place so the overall expression was still `dynamic`. Implicit casts from `dynamic` are still allowed, so it wasn't flagged that the cast was in the wrong place - disabling implicit casts from dynamic makes it more obvious that there is a problem, but doesn't fix the entire issue. In addition to the cast being in the wrong place, it also was to the wrong type. Casting to `num` instead of `num?` does not surface any warnings because it's valid to pass the `num` to an argument wanting `num?`. This was not surfaced originally due to a bug in the VM which causes the opt-in state of a package in the experiment allow list to _not_ control the soundness when executing. Add explicit opt in test runs for now. https://github.com/dart-lang/sdk/issues/43243
A Dart CSS parser.
Parsing CSS is easy!
import 'package:csslib/parser.dart'; main() { var stylesheet = parse( '.foo { color: red; left: 20px; top: 20px; width: 100px; height:200px }'); print(stylesheet.toDebugString()); }
You can pass a String
or List<int>
to parse
.