Chromium Code Reviews
DescriptionSerialize 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 #
Messages
Total messages: 4 (1 generated)
|
|||||||||||||||||||||||||||||||||||||