Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Analyze/test analysis-options page code excerpts #1912

Merged
merged 5 commits into from
Sep 19, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/_guides/language/analysis-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,10 @@ You can use the flags together or separately; both default to `true`.
includes an implicit downcast that would be caught by this flag:

{:.fails-sa}
<?code-excerpt "analysis/lib/assignment.dart (implicit-downcast)"?>
{% prettify dart %}
<?code-excerpt "analysis/lib/assignment.dart (implicit-downcast)" replace="/(s = )(o)/$1[!$2!]/g"?>
{% prettify dart class="linenums:10 analyzer" %}
chalin marked this conversation as resolved.
Show resolved Hide resolved
Object o = ...
String s = o; // Implicit downcast
String s = [!o!]; // Implicit downcast
String s2 = s.substring(1);
{% endprettify %}

Expand Down