From cf234cf132fc75d5c082b5e71dfeeba7bbfb7e18 Mon Sep 17 00:00:00 2001 From: Deanna Garcia Date: Mon, 10 May 2021 22:11:04 +0000 Subject: [PATCH] Updating Kotlin compiler version and testing new functionality it allows --- java/kotlin-lite/pom.xml | 2 +- .../com/google/protobuf/Proto2LiteTest.kt | 53 +++++++++--------- java/kotlin/pom.xml | 2 +- .../kotlin/com/google/protobuf/Proto2Test.kt | 56 +++++++++---------- 4 files changed, 55 insertions(+), 58 deletions(-) diff --git a/java/kotlin-lite/pom.xml b/java/kotlin-lite/pom.xml index 80b4c4ffae..808faa71dc 100644 --- a/java/kotlin-lite/pom.xml +++ b/java/kotlin-lite/pom.xml @@ -17,7 +17,7 @@ - 1.4.31 + 1.5.0 diff --git a/java/kotlin-lite/src/test/kotlin/com/google/protobuf/Proto2LiteTest.kt b/java/kotlin-lite/src/test/kotlin/com/google/protobuf/Proto2LiteTest.kt index 8726bbf9f9..1c67f571df 100644 --- a/java/kotlin-lite/src/test/kotlin/com/google/protobuf/Proto2LiteTest.kt +++ b/java/kotlin-lite/src/test/kotlin/com/google/protobuf/Proto2LiteTest.kt @@ -452,37 +452,34 @@ class Proto2LiteTest { this[UnittestLite.repeatedImportEnumExtensionLite].add(ImportEnumLite.IMPORT_LITE_BAR) this[UnittestLite.repeatedStringPieceExtensionLite].add("224") this[UnittestLite.repeatedCordExtensionLite].add("225") - this[UnittestLite.repeatedInt32ExtensionLite].add(301) - this[UnittestLite.repeatedInt64ExtensionLite].add(302L) - this[UnittestLite.repeatedUint32ExtensionLite].add(303) - this[UnittestLite.repeatedUint64ExtensionLite].add(304L) - this[UnittestLite.repeatedSint32ExtensionLite].add(305) - this[UnittestLite.repeatedSint64ExtensionLite].add(306L) - this[UnittestLite.repeatedFixed32ExtensionLite].add(307) - this[UnittestLite.repeatedFixed64ExtensionLite].add(308L) - this[UnittestLite.repeatedSfixed32ExtensionLite].add(309) - this[UnittestLite.repeatedSfixed64ExtensionLite].add(310L) - this[UnittestLite.repeatedFloatExtensionLite].add(311F) - this[UnittestLite.repeatedDoubleExtensionLite].add(312.0) - this[UnittestLite.repeatedBoolExtensionLite].add(false) - this[UnittestLite.repeatedStringExtensionLite].add("315") - this[UnittestLite.repeatedBytesExtensionLite].add(toBytes("316")) - this[UnittestLite.repeatedGroupExtensionLite].add(repeatedGroupExtensionLite { a = 317 }) - this[UnittestLite.repeatedNestedMessageExtensionLite].add( + this[UnittestLite.repeatedInt32ExtensionLite] += 301 + this[UnittestLite.repeatedInt64ExtensionLite] += 302L + this[UnittestLite.repeatedUint32ExtensionLite] += 303 + this[UnittestLite.repeatedUint64ExtensionLite] += 304L + this[UnittestLite.repeatedSint32ExtensionLite] += 305 + this[UnittestLite.repeatedSint64ExtensionLite] += 306L + this[UnittestLite.repeatedFixed32ExtensionLite] += 307 + this[UnittestLite.repeatedFixed64ExtensionLite] += 308L + this[UnittestLite.repeatedSfixed32ExtensionLite] += 309 + this[UnittestLite.repeatedSfixed64ExtensionLite] += 310L + this[UnittestLite.repeatedFloatExtensionLite] += 311F + this[UnittestLite.repeatedDoubleExtensionLite] += 312.0 + this[UnittestLite.repeatedBoolExtensionLite] += false + this[UnittestLite.repeatedStringExtensionLite] += "315" + this[UnittestLite.repeatedBytesExtensionLite] += toBytes("316") + this[UnittestLite.repeatedGroupExtensionLite] += repeatedGroupExtensionLite { a = 317 } + this[UnittestLite.repeatedNestedMessageExtensionLite] += TestAllTypesLiteKt.nestedMessage { bb = 318 } - ) - this[UnittestLite.repeatedForeignMessageExtensionLite].add(foreignMessageLite { c = 319 }) - this[UnittestLite.repeatedImportMessageExtensionLite].add( + this[UnittestLite.repeatedForeignMessageExtensionLite] += foreignMessageLite { c = 319 } + this[UnittestLite.repeatedImportMessageExtensionLite] += ImportMessageLite.newBuilder().setD(320).build() - ) - this[UnittestLite.repeatedLazyMessageExtensionLite].add( + this[UnittestLite.repeatedLazyMessageExtensionLite] += TestAllTypesLiteKt.nestedMessage { bb = 327 } - ) - this[UnittestLite.repeatedNestedEnumExtensionLite].add(NestedEnum.BAZ) - this[UnittestLite.repeatedForeignEnumExtensionLite].add(ForeignEnumLite.FOREIGN_LITE_BAZ) - this[UnittestLite.repeatedImportEnumExtensionLite].add(ImportEnumLite.IMPORT_LITE_BAZ) - this[UnittestLite.repeatedStringPieceExtensionLite].add("324") - this[UnittestLite.repeatedCordExtensionLite].add("325") + this[UnittestLite.repeatedNestedEnumExtensionLite] += NestedEnum.BAZ + this[UnittestLite.repeatedForeignEnumExtensionLite] += ForeignEnumLite.FOREIGN_LITE_BAZ + this[UnittestLite.repeatedImportEnumExtensionLite] += ImportEnumLite.IMPORT_LITE_BAZ + this[UnittestLite.repeatedStringPieceExtensionLite] += "324" + this[UnittestLite.repeatedCordExtensionLite] += "325" this[UnittestLite.defaultInt32ExtensionLite] = 401 this[UnittestLite.defaultInt64ExtensionLite] = 402L this[UnittestLite.defaultUint32ExtensionLite] = 403 diff --git a/java/kotlin/pom.xml b/java/kotlin/pom.xml index 5f28125175..6c35d77cf1 100644 --- a/java/kotlin/pom.xml +++ b/java/kotlin/pom.xml @@ -17,7 +17,7 @@ - 1.4.31 + 1.5.0 diff --git a/java/kotlin/src/test/kotlin/com/google/protobuf/Proto2Test.kt b/java/kotlin/src/test/kotlin/com/google/protobuf/Proto2Test.kt index 72b9792b55..d39754682b 100644 --- a/java/kotlin/src/test/kotlin/com/google/protobuf/Proto2Test.kt +++ b/java/kotlin/src/test/kotlin/com/google/protobuf/Proto2Test.kt @@ -448,34 +448,34 @@ class Proto2Test { this[UnittestProto.repeatedImportEnumExtension].add(ImportEnum.IMPORT_BAR) this[UnittestProto.repeatedStringPieceExtension].add("224") this[UnittestProto.repeatedCordExtension].add("225") - this[UnittestProto.repeatedInt32Extension].add(301) - this[UnittestProto.repeatedInt64Extension].add(302L) - this[UnittestProto.repeatedUint32Extension].add(303) - this[UnittestProto.repeatedUint64Extension].add(304L) - this[UnittestProto.repeatedSint32Extension].add(305) - this[UnittestProto.repeatedSint64Extension].add(306L) - this[UnittestProto.repeatedFixed32Extension].add(307) - this[UnittestProto.repeatedFixed64Extension].add(308L) - this[UnittestProto.repeatedSfixed32Extension].add(309) - this[UnittestProto.repeatedSfixed64Extension].add(310L) - this[UnittestProto.repeatedFloatExtension].add(311F) - this[UnittestProto.repeatedDoubleExtension].add(312.0) - this[UnittestProto.repeatedBoolExtension].add(false) - this[UnittestProto.repeatedStringExtension].add("315") - this[UnittestProto.repeatedBytesExtension].add(toBytes("316")) - this[UnittestProto.repeatedGroupExtension].add(repeatedGroupExtension { a = 317 }) - this[UnittestProto.repeatedNestedMessageExtension] - .add(TestAllTypesKt.nestedMessage { bb = 318 }) - this[UnittestProto.repeatedForeignMessageExtension].add(foreignMessage { c = 319 }) - this[UnittestProto.repeatedImportMessageExtension] - .add(ImportMessage.newBuilder().setD(320).build()) - this[UnittestProto.repeatedLazyMessageExtension] - .add(TestAllTypesKt.nestedMessage { bb = 327 }) - this[UnittestProto.repeatedNestedEnumExtension].add(NestedEnum.BAZ) - this[UnittestProto.repeatedForeignEnumExtension].add(ForeignEnum.FOREIGN_BAZ) - this[UnittestProto.repeatedImportEnumExtension].add(ImportEnum.IMPORT_BAZ) - this[UnittestProto.repeatedStringPieceExtension].add("324") - this[UnittestProto.repeatedCordExtension].add("325") + this[UnittestProto.repeatedInt32Extension] += 301 + this[UnittestProto.repeatedInt64Extension] += 302L + this[UnittestProto.repeatedUint32Extension] += 303 + this[UnittestProto.repeatedUint64Extension] += 304L + this[UnittestProto.repeatedSint32Extension] += 305 + this[UnittestProto.repeatedSint64Extension] += 306L + this[UnittestProto.repeatedFixed32Extension] += 307 + this[UnittestProto.repeatedFixed64Extension] += 308L + this[UnittestProto.repeatedSfixed32Extension] += 309 + this[UnittestProto.repeatedSfixed64Extension] += 310L + this[UnittestProto.repeatedFloatExtension] += 311F + this[UnittestProto.repeatedDoubleExtension] += 312.0 + this[UnittestProto.repeatedBoolExtension] += false + this[UnittestProto.repeatedStringExtension] += "315" + this[UnittestProto.repeatedBytesExtension] += toBytes("316") + this[UnittestProto.repeatedGroupExtension] += repeatedGroupExtension { a = 317 } + this[UnittestProto.repeatedNestedMessageExtension] += + TestAllTypesKt.nestedMessage { bb = 318 } + this[UnittestProto.repeatedForeignMessageExtension] += foreignMessage { c = 319 } + this[UnittestProto.repeatedImportMessageExtension] += + ImportMessage.newBuilder().setD(320).build() + this[UnittestProto.repeatedLazyMessageExtension] += + TestAllTypesKt.nestedMessage { bb = 327 } + this[UnittestProto.repeatedNestedEnumExtension] += NestedEnum.BAZ + this[UnittestProto.repeatedForeignEnumExtension] += ForeignEnum.FOREIGN_BAZ + this[UnittestProto.repeatedImportEnumExtension] += ImportEnum.IMPORT_BAZ + this[UnittestProto.repeatedStringPieceExtension] += "324" + this[UnittestProto.repeatedCordExtension] += "325" this[UnittestProto.defaultInt32Extension] = 401 this[UnittestProto.defaultInt64Extension] = 402L this[UnittestProto.defaultUint32Extension] = 403