mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 08:44:27 +00:00
[cfe] Use more precise types for FunctionInvocation and LocalFunctionInvocation in type checker
Issue: https://github.com/dart-lang/sdk/issues/45340 Change-Id: I963b3a3b1143a9fbd0eac700daa11488aa5b183a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/198182 Commit-Queue: Alexander Markov <alexmarkov@google.com> Reviewed-by: Johnni Winther <johnniwinther@google.com>
This commit is contained in:
parent
5c0ff97acf
commit
df3bb63a13
1 changed files with 2 additions and 4 deletions
|
@ -1122,8 +1122,7 @@ class TypeCheckingVisitor
|
|||
node.arguments.positional.forEach(visitExpression);
|
||||
node.arguments.named
|
||||
.forEach((NamedExpression n) => visitExpression(n.value));
|
||||
// TODO(johnniwinther): Return the correct result type.
|
||||
return const DynamicType();
|
||||
return node.functionType?.returnType ?? const DynamicType();
|
||||
}
|
||||
|
||||
@override
|
||||
|
@ -1190,8 +1189,7 @@ class TypeCheckingVisitor
|
|||
node.arguments.positional.forEach(visitExpression);
|
||||
node.arguments.named
|
||||
.forEach((NamedExpression n) => visitExpression(n.value));
|
||||
// TODO(johnniwinther): Return the correct result type.
|
||||
return const DynamicType();
|
||||
return node.functionType.returnType;
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
Loading…
Reference in a new issue