Skip to content

Commit

Permalink
Adjust Dart.g to allow prefix on Function as a type
Browse files Browse the repository at this point in the history
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
dart-lang/language#3492.

Change-Id: Iaaba1c3bc8f5d3a8700c8e62ec3a1af92334840b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/339561
Reviewed-by: Chloe Stefantsova <[email protected]>
Commit-Queue: Erik Ernst <[email protected]>
  • Loading branch information
eernstg authored and Commit Queue committed Dec 5, 2023
1 parent 9b4c2f0 commit 9a4ca01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/spec_parser/Dart.g
Original file line number Diff line number Diff line change
Expand Up @@ -1441,7 +1441,7 @@ typeNotFunction
typeNotVoidNotFunction
: typeName typeArguments?
| FUNCTION
| (typeIdentifier '.')? FUNCTION
;
typeName
Expand Down

0 comments on commit 9a4ca01

Please sign in to comment.