Ignore HintCode.UNNECESSARY_TYPE_CHECK_TRUE (#1457)

This commit is contained in:
Konstantin Scheglov 2021-09-07 13:21:01 -06:00 committed by GitHub
parent ad886d97d6
commit 3112f80d49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 3 deletions

View File

@ -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;

View File

@ -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!);

View File

@ -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
@ -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 {