Skip to content

Commit

Permalink
Ignore HintCode.UNNECESSARY_TYPE_CHECK_TRUE
Browse files Browse the repository at this point in the history
  • Loading branch information
scheglov committed Sep 2, 2021
1 parent 1615bb1 commit e852901
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
8 changes: 6 additions & 2 deletions lib/src/extend/functions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -404,14 +404,18 @@ List<List<List<ComplexSelectorComponent>>>? _mergeFinalCombinators(
result.addFirst([
[compound2, combinator2]
]);
components1..add(compound1)..add(Combinator.child);
components1
..add(compound1)
..add(Combinator.child);
} else if (combinator2 == Combinator.child &&
(combinator1 == Combinator.nextSibling ||
combinator1 == Combinator.followingSibling)) {
result.addFirst([
[compound1, combinator1]
]);
components2..add(compound2)..add(Combinator.child);
components2
..add(compound2)
..add(Combinator.child);
} else if (combinator1 == combinator2) {
var unified = unifyCompound(compound1.components, compound2.components);
if (unified == null) return null;
Expand Down
1 change: 1 addition & 0 deletions lib/src/visitor/async_evaluate.dart
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,7 @@ class _EvaluateVisitor
}

var callable = function.assertFunction("function").callable;
// ignore: unnecessary_type_check
if (callable is AsyncCallable) {
return await _runFunctionCallable(
invocation, callable, _callableNode!);
Expand Down
3 changes: 2 additions & 1 deletion lib/src/visitor/evaluate.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// DO NOT EDIT. This file was generated from async_evaluate.dart.
// See tool/grind/synchronize.dart for details.
//
// Checksum: 37fd148527c89ecfa79b51500b589b27a83f542e
// Checksum: 2d9c3bb53fc29472f7fbc68d9a3f5b8464f95bc5
//
// ignore_for_file: unused_import

Expand Down Expand Up @@ -446,6 +446,7 @@ class _EvaluateVisitor
}

var callable = function.assertFunction("function").callable;
// ignore: unnecessary_type_check
if (callable is Callable) {
return _runFunctionCallable(invocation, callable, _callableNode!);
} else {
Expand Down

0 comments on commit e852901

Please sign in to comment.