Draft of typed getExtension#357
Conversation
|
|
||
| /// An object representing a protobuf message field. | ||
| class FieldInfo<T> { | ||
| /// For a repeated field S is List<T> for a non-repeated field S=T. |
There was a problem hiding this comment.
I see some type parameters S and U throughout the PR. Are they meant to be separate types? The comment above mentions S, but the parameter is U here. I am guessing either is meant to represent the List as mentioned
There was a problem hiding this comment.
Sorry - I did a rename, but forgot to rename the comment.
| var value = _values[index]; | ||
| if (value != null) return value as List<T>; | ||
| return _getDefaultList<T>(_nonExtensionInfoByIndex(index)); | ||
| return _getDefaultList<T, dynamic>(_nonExtensionInfoByIndex(index)); |
There was a problem hiding this comment.
Why would this be dynamic and not List<T> here?
| } | ||
|
|
||
| List<T> _getDefaultList<T>(FieldInfo<T> fi) { | ||
| List<T> _getDefaultList<T, U>(FieldInfo<T, U> fi) { |
There was a problem hiding this comment.
Is the new parameter plumbed through anywhere from here?
|
👀 |
|
Do you remember what problem this is solving @sigurdm? PR description doesn't refer to any issues. |
Currently you get back a I don't think I'll find the time to pursue this - feel free to close. |
cc: @nichite