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

Issue 1841603003: Serialize references to type parameters in final fields. (Closed)

Created:
4 years, 8 months ago by scheglov
Modified:
4 years, 8 months ago
Reviewers:
Paul Berry
CC:
reviews_dartlang.org
Base URL:
git@github.com:dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Serialize references to type parameters in final fields. When we generate SDK summary using AST (just for testing) we find code like this: class _SimpleCallbackSink<T> extends ChunkedConversionSink<T> { final _ChunkedConversionCallback<List<T>> _callback; final List<T> _accumulated = <T>[]; _SimpleCallbackSink(this._callback); void add(T chunk) { _accumulated.add(chunk); } void close() { _callback(_accumulated); } } It is not a valid constant, but we don't know this on AST level. We could probably detect this, but I guess we would need to serialize a wider set of expressions for type propagatation / inference anyway, so it is better to serialize than to fail in this case. R=paulberry@google.com BUG= Committed: https://github.com/dart-lang/sdk/commit/ce0fbc63cd05a452224e4e4f22c324088f235715

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+33 lines, -9 lines) Patch
M pkg/analyzer/lib/src/summary/summarize_elements.dart View 8 chunks +13 lines, -9 lines 0 comments Download
M pkg/analyzer/test/src/summary/resynthesize_test.dart View 1 chunk +8 lines, -0 lines 0 comments Download
M pkg/analyzer/test/src/summary/summary_common.dart View 1 chunk +12 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (1 generated)
scheglov
4 years, 8 months ago (2016-03-29 02:40:19 UTC) #1
Paul Berry
lgtm
4 years, 8 months ago (2016-03-29 02:44:23 UTC) #2
scheglov
4 years, 8 months ago (2016-03-29 02:45:50 UTC) #4
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
ce0fbc63cd05a452224e4e4f22c324088f235715 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698