Skip to content
This repository was archived by the owner on Sep 16, 2022. It is now read-only.

Commit c9b0965

Browse files
MichaelRFairhurstalorenzen
authored andcommitted
Dart 2 may add a restriction that void values cannot be returned in a function that returns dynamic. dart-lang/sdk#32161
This commonly appears in the form `f() => g()` where `g()` returns void, and `f()` is a top-level or a method, so it gets an implicit dynamic rather than type inference. Even if the restriction is not added to dart 2, this migration creates cleaner code that more often expresses the true intent. #codehealth Tested: TAP --sample for global presubmit queue http://test/OCL:186244698:BASE:186239924:1519083758984:829050d9 PiperOrigin-RevId: 186623288
1 parent eccce8f commit c9b0965

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

_tests/test/core/linker/integration_dart_test.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -164,5 +164,5 @@ class DirectiveLoggingChecks implements DoCheck {
164164
DirectiveLoggingChecks(this.log);
165165

166166
@override
167-
ngDoCheck() => log.info("check");
167+
void ngDoCheck() => log.info("check");
168168
}

0 commit comments

Comments
 (0)