Skip to content
This repository was archived by the owner on Nov 20, 2024. It is now read-only.

Commit a1165b4

Browse files
authored
Merge pull request #1728 from dart-lang/raw_expression_null_check
allow for null raw expressions
2 parents bd1cd1f + 9d8b587 commit a1165b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/src/rules/use_to_and_as_if_applicable.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class _Visitor extends SimpleAstVisitor<void> {
101101
}
102102

103103
bool _checkExpression(Expression rawExpression) {
104-
final expression = rawExpression.unParenthesized;
104+
final expression = rawExpression?.unParenthesized;
105105
return expression is InstanceCreationExpression &&
106106
expression.argumentList.arguments.length == 1 &&
107107
expression.argumentList.arguments.first is ThisExpression;

0 commit comments

Comments
 (0)