From 3c5c044d9b8ea7ff6f95b5f5e72f52e3d7a75917 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96mer=20Sinan=20A=C4=9Facan?= Date: Wed, 24 Aug 2022 15:03:53 +0200 Subject: [PATCH] Remove a redundant arg --- protobuf/lib/src/protobuf/extension.dart | 6 +++--- protoc_plugin/lib/src/extension_generator.dart | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/protobuf/lib/src/protobuf/extension.dart b/protobuf/lib/src/protobuf/extension.dart index 17343fc91..5c4947765 100644 --- a/protobuf/lib/src/protobuf/extension.dart +++ b/protobuf/lib/src/protobuf/extension.dart @@ -22,12 +22,12 @@ class Extension extends FieldInfo { protoName: protoName); Extension.repeated(this.extendee, String name, int tagNumber, int fieldType, - {CheckFunc? check, - CreateBuilderFunc? subBuilder, + {CreateBuilderFunc? subBuilder, ValueOfFunc? valueOf, List? enumValues, String? protoName}) - : super.repeated(name, tagNumber, null, fieldType, check, subBuilder, + : super.repeated(name, tagNumber, null, fieldType, + getCheckFunction(fieldType), subBuilder, valueOf: valueOf, enumValues: enumValues, protoName: protoName); @override diff --git a/protoc_plugin/lib/src/extension_generator.dart b/protoc_plugin/lib/src/extension_generator.dart index 90a8a93a2..38182bc6e 100644 --- a/protoc_plugin/lib/src/extension_generator.dart +++ b/protoc_plugin/lib/src/extension_generator.dart @@ -108,8 +108,6 @@ class ExtensionGenerator { named['protoName'] = _field.quotedProtoName; if (_field.isRepeated) { invocation = '$protobufImportPrefix.Extension<$dartType>.repeated'; - named['check'] = - '$protobufImportPrefix.getCheckFunction(${_field.typeConstant})'; if (type.isMessage || type.isGroup) { named['subBuilder'] = '$dartType.create'; } else if (type.isEnum) {