Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(239)

Unified Diff: pkg/front_end/lib/src/fasta/kernel/kernel_procedure_builder.dart

Issue 2952873002: In strong mode, properly infer the return types of setters as `void` (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/front_end/lib/src/fasta/kernel/kernel_procedure_builder.dart
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_procedure_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_procedure_builder.dart
index 5b7e77b9106f37b45f173a5ad793c5c19292c14e..8c092c031c11ea22f52c535a8b4d9defd41dc394 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_procedure_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_procedure_builder.dart
@@ -247,11 +247,7 @@ class KernelProcedureBuilder extends KernelFunctionBuilder {
bool get isEligibleForTopLevelInference {
if (!isInstanceMember) return false;
- if (returnType == null) {
- // For now, we skip inferred return types of setters.
- // TODO(paulberry): fix this.
- if (!isSetter) return true;
- }
+ if (returnType == null) return true;
if (formals != null) {
for (var formal in formals) {
if (formal.type == null) return true;

Powered by Google App Engine
This is Rietveld 408576698