Skip to content

Commit 91d16af

Browse files
osa1Commit Queue
authored andcommitted
[kernel] Document how to compute Procedure type
Change-Id: I9772c3124a7c19e8754ba99edf355a6b76aaf1a9 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/344520 Reviewed-by: Chloe Stefantsova <cstefantsova@google.com> Commit-Queue: Ömer Ağacan <omersa@google.com>
1 parent 70783e5 commit 91d16af

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pkg/kernel/lib/ast.dart

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2971,8 +2971,11 @@ class Procedure extends Member implements GenericFunction {
29712971
/// Since `Super.method` allows `num` as argument, the inserted covariant
29722972
/// check must be against `num` and not `int`, and the parameter type of the
29732973
/// forwarding semi stub must be changed to `num`. Still, the interface of
2974-
/// `Class` requires that `Class.method` is `void Function(int)`, so for this,
2975-
/// it is stored explicitly as the [signatureType] on the procedure.
2974+
/// `Class` requires that `Class.method` is `void Function(int)`, so for
2975+
/// this, it is stored explicitly as the [signatureType] on the procedure.
2976+
///
2977+
/// When [signatureType] is null, you can compute the function type with
2978+
/// `function.computeFunctionType(Nullability.nonNullable)`.
29762979
FunctionType? signatureType;
29772980

29782981
Procedure(Name name, ProcedureKind kind, FunctionNode function,

0 commit comments

Comments
 (0)