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

Issue 2952883003: Make the kernel API for promoted type parameter bounds less error-prone. (Closed)

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

Description

Make the kernel API for promoted type parameter bounds less error-prone. I'm about to start introducing usages of TypeParameterType.bound, and nearly all of the usage sites will need to fall back on TypeParameter.bound if there is no bound stored in the TypeParameterType. This CL places the fallback behavior in the TypeParameterType.bound getter so that we won't have to duplicate it at every usage site (and risk making mistakes). The few call sites that don't want the fallback behavior (such as the one in ast_to_binary.dart) can avoid it by referring to TypeParameterType.promotedBound directly. R=ahe@google.com Committed: https://github.com/dart-lang/sdk/commit/6ac836fbb3cc495b28b17f6276ec4fa734bf3e4c

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -4 lines) Patch
M pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart View 1 chunk +1 line, -1 line 0 comments Download
M pkg/kernel/lib/ast.dart View 2 chunks +5 lines, -2 lines 0 comments Download
M pkg/kernel/lib/binary/ast_to_binary.dart View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 5 (2 generated)
Paul Berry
3 years, 6 months ago (2017-06-22 19:59:48 UTC) #2
ahe
lgtm
3 years, 6 months ago (2017-06-23 10:41:53 UTC) #3
Paul Berry
3 years, 6 months ago (2017-06-23 12:45:05 UTC) #5
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
6ac836fbb3cc495b28b17f6276ec4fa734bf3e4c (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698