Skip to content

Commit

Permalink
Address review comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmorgan committed Nov 8, 2018
1 parent 07d6374 commit 39d4b4b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
7 changes: 1 addition & 6 deletions built_value_generator/lib/src/serializer_source_class.dart
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,7 @@ abstract class SerializerSourceClass

@memoized
BuiltList<String> get genericParameters =>
new BuiltList<String>(element.typeParameters.map((e) {
final result = parsedLibrary.getElementDeclaration(e).node.toSource();
// Strip off any bounds.
final index = result.indexOf(' extends ');
return index == -1 ? result : result.substring(0, index);
}));
new BuiltList<String>(element.typeParameters.map((e) => e.name));

@memoized
BuiltList<String> get genericBounds =>
Expand Down
7 changes: 2 additions & 5 deletions built_value_generator/lib/src/value_source_class.dart
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,8 @@ abstract class ValueSourceClass
}

@memoized
BuiltList<String> get genericParameters => new BuiltList<String>(
element.typeParameters.map((element) => element.name));
// BuiltList<String> get genericParameters =>
// new BuiltList<String>(element.typeParameters.map((element) =>
// parsedLibrary.getElementDeclaration(element).node.toSource()));
BuiltList<String> get genericParameters =>
new BuiltList<String>(element.typeParameters.map((e) => e.name));

@memoized
BuiltList<String> get genericBounds =>
Expand Down

0 comments on commit 39d4b4b

Please sign in to comment.