From 523bfd4f233cbf6b898d22806a980f284c8402ce Mon Sep 17 00:00:00 2001 From: Dia Kharrat Date: Fri, 24 Jun 2016 00:05:02 -0700 Subject: add nullable qualifier to nil return types Add the `nullable` qualifier to return types of Objective-C methods that can return a nil due to errors. This change makes these methods compatible with the Swift 2 try-catch syntax. --- objectivec/Tests/GPBSwiftTests.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'objectivec/Tests/GPBSwiftTests.swift') diff --git a/objectivec/Tests/GPBSwiftTests.swift b/objectivec/Tests/GPBSwiftTests.swift index 474fde38..b5999c21 100644 --- a/objectivec/Tests/GPBSwiftTests.swift +++ b/objectivec/Tests/GPBSwiftTests.swift @@ -446,7 +446,7 @@ class GPBBridgeTests: XCTestCase { let data = msg.data() - let msg2 = Message2(data: data!, error:nil) + let msg2 = try! Message2(data: data!) XCTAssertTrue(msg2 !== msg) // New instance XCTAssertEqual(msg.optionalInt32, Int32(100)) XCTAssertEqual(msg.optionalInt64, Int64(101)) -- cgit v1.2.3