diff options
author | Dia Kharrat <dkharrat@gmail.com> | 2016-06-24 00:05:02 -0700 |
---|---|---|
committer | Dia Kharrat <dkharrat@gmail.com> | 2016-07-05 01:30:41 -0700 |
commit | 523bfd4f233cbf6b898d22806a980f284c8402ce (patch) | |
tree | 1146a800dcd69e4a15dee8504fcb6f5b97b7207f /objectivec/Tests | |
parent | cae3b0cbb689d0ed1e5da73942a5a9705f3411b0 (diff) | |
download | protobuf-523bfd4f233cbf6b898d22806a980f284c8402ce.tar.gz protobuf-523bfd4f233cbf6b898d22806a980f284c8402ce.tar.bz2 protobuf-523bfd4f233cbf6b898d22806a980f284c8402ce.zip |
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.
Diffstat (limited to 'objectivec/Tests')
-rw-r--r-- | objectivec/Tests/GPBSwiftTests.swift | 2 |
1 files changed, 1 insertions, 1 deletions
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)) |