diff --git a/built_value_generator/lib/src/serializer_source_class.dart b/built_value_generator/lib/src/serializer_source_class.dart index dd0957f0..5aed9e79 100644 --- a/built_value_generator/lib/src/serializer_source_class.dart +++ b/built_value_generator/lib/src/serializer_source_class.dart @@ -74,12 +74,7 @@ abstract class SerializerSourceClass @memoized BuiltList get genericParameters => - new BuiltList(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(element.typeParameters.map((e) => e.name)); @memoized BuiltList get genericBounds => diff --git a/built_value_generator/lib/src/value_source_class.dart b/built_value_generator/lib/src/value_source_class.dart index 6bd22cef..70278ea7 100644 --- a/built_value_generator/lib/src/value_source_class.dart +++ b/built_value_generator/lib/src/value_source_class.dart @@ -116,11 +116,8 @@ abstract class ValueSourceClass } @memoized - BuiltList get genericParameters => new BuiltList( - element.typeParameters.map((element) => element.name)); -// BuiltList get genericParameters => -// new BuiltList(element.typeParameters.map((element) => -// parsedLibrary.getElementDeclaration(element).node.toSource())); + BuiltList get genericParameters => + new BuiltList(element.typeParameters.map((e) => e.name)); @memoized BuiltList get genericBounds =>