mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 10:49:00 +00:00
Fix example in doc
This commit is contained in:
parent
3e72e09a97
commit
1f30612a21
1 changed files with 1 additions and 1 deletions
|
@ -165,7 +165,7 @@ Standard checked mode would print `"a string"` without error.
|
|||
In standard Dart, `is` and `as` runtime checks expose the unsoundness of the type system in certain cases. For example, consider:
|
||||
|
||||
```dart
|
||||
var list = ["hello", "world"];
|
||||
var list = <dynamic>["hello", "world"];
|
||||
if (list is List<int>) {
|
||||
...
|
||||
} else if (list is List<String>) {
|
||||
|
|
Loading…
Reference in a new issue