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

Issue 2940703002: Fix top level type inference for binary operators. (Closed)

Created:
3 years, 6 months ago by Paul Berry
Modified:
3 years, 6 months ago
Reviewers:
scheglov
CC:
reviews_dartlang.org, dart-fe-team+reviews_google.com
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Fix top level type inference for binary operators. Multiple changes were required: - The analyzer's mock SDK had an incorrect return type for `num.operator/`. - We weren't considering the RHS of the binary operators `+`, `-`, `*`, and `%` to be an inference dependency (we need to, since the special overload rules for int depend on the type of the RHS). - We weren't executing the overload logic when doing top level type inference. - The logic for deciding what operators are overloaded was incorrect. R=scheglov@google.com Committed: https://github.com/dart-lang/sdk/commit/a1ecb46a4c657ff5bc59b5fce98004ca21246135

Patch Set 1 #

Total comments: 2

Messages

Total messages: 6 (2 generated)
Paul Berry
3 years, 6 months ago (2017-06-13 19:39:04 UTC) #2
scheglov
LGTM https://codereview.chromium.org/2940703002/diff/1/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart File pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart (right): https://codereview.chromium.org/2940703002/diff/1/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart#newcode1276 pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart:1276: if (name == '+' || name == '-' ...
3 years, 6 months ago (2017-06-13 19:46:51 UTC) #3
Paul Berry
https://codereview.chromium.org/2940703002/diff/1/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart File pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart (right): https://codereview.chromium.org/2940703002/diff/1/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart#newcode1276 pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart:1276: if (name == '+' || name == '-' || ...
3 years, 6 months ago (2017-06-13 20:06:39 UTC) #4
Paul Berry
3 years, 6 months ago (2017-06-13 20:07:06 UTC) #6
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
a1ecb46a4c657ff5bc59b5fce98004ca21246135 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698