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

Fix pre-existing HintCode.UNNECESSARY_TYPE_CHECK_TRUE #1457

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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