Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 96e7a4f

Browse files
nshahancommit-bot@chromium.org
authored andcommitted
[dart:async] Temporarily work around compilation errors
The front end is failing to consistently find the correct LUB for function types with generic type arguments (especially with nullability). We should revert this change after it is fixed. dart-lang/sdk#39534 Change-Id: Ie7f6856ccc269c6b287a1f96f264bdd53a2d1782 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126404 Reviewed-by: Leaf Petersen <leafp@google.com> Commit-Queue: Nicholas Shahan <nshahan@google.com>
1 parent 10f1586 commit 96e7a4f

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

sdk_nnbd/lib/async/zone.dart

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,14 +110,16 @@ abstract class ZoneSpecification {
110110
ForkHandler? fork}) {
111111
return new ZoneSpecification(
112112
handleUncaughtError: handleUncaughtError ?? other.handleUncaughtError,
113-
run: run ?? other.run,
114-
runUnary: runUnary ?? other.runUnary,
115-
runBinary: runBinary ?? other.runBinary,
116-
registerCallback: registerCallback ?? other.registerCallback,
113+
// TODO(#39534) Cleanup casts to dynamic when CFE can find the LUB.
114+
run: (run ?? other.run) as dynamic,
115+
runUnary: (runUnary ?? other.runUnary) as dynamic,
116+
runBinary: (runBinary ?? other.runBinary) as dynamic,
117+
registerCallback:
118+
(registerCallback ?? other.registerCallback) as dynamic,
117119
registerUnaryCallback:
118-
registerUnaryCallback ?? other.registerUnaryCallback,
120+
(registerUnaryCallback ?? other.registerUnaryCallback) as dynamic,
119121
registerBinaryCallback:
120-
registerBinaryCallback ?? other.registerBinaryCallback,
122+
(registerBinaryCallback ?? other.registerBinaryCallback) as dynamic,
121123
errorCallback: errorCallback ?? other.errorCallback,
122124
scheduleMicrotask: scheduleMicrotask ?? other.scheduleMicrotask,
123125
createTimer: createTimer ?? other.createTimer,

0 commit comments

Comments
 (0)