Adjust Dart.g to allow prefix on Function as a type

This CL changes the specification grammar Dart.g such that it allows
using `p.Function` to denote the built-in type `Function`. This is
necessary in the case where 'dart:core' has been imported with an
import prefix `p` (and it hasn't been imported without a prefix at the
same time). The corresponding spec update is in
https://github.com/dart-lang/language/pull/3492.

Change-Id: Iaaba1c3bc8f5d3a8700c8e62ec3a1af92334840b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/339561
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
This commit is contained in:
Erik Ernst 2023-12-05 09:31:49 +00:00 committed by Commit Queue
parent 9b4c2f01b6
commit 9a4ca01983

View file

@ -1441,7 +1441,7 @@ typeNotFunction
typeNotVoidNotFunction
: typeName typeArguments?
| FUNCTION
| (typeIdentifier '.')? FUNCTION
;
typeName