bind: fix generated declaration of GoUniverseerror

GoUniverseerror is a (generated) protocol type, and variables of
protocol types use id<> notation.

Change-Id: I3d36b3ba634c10f0e59424faf71809c94df52cc6
Reviewed-on: https://go-review.googlesource.com/29052
Reviewed-by: David Crawshaw <crawshaw@golang.org>
This commit is contained in:
Elias Naur 2016-09-12 03:37:42 +02:00
parent bf31dd1a5e
commit 08c3b2f4a5
3 changed files with 3 additions and 3 deletions

View File

@ -816,7 +816,7 @@ func (g *objcGen) genInterfaceMethodProxy(obj *types.TypeName, m *types.Func) {
var rets []string
for i, p := range s.retParams {
if isErrorType(p.typ) {
g.Printf("GoUniverseerror* _%s = nil;\n", p.name)
g.Printf("id<GoUniverseerror> _%s = nil;\n", p.name)
if i == len(s.retParams)-1 { // last param.
g.Printf("if (!returnVal) {\n")
} else {

View File

@ -234,7 +234,7 @@ int32_t cproxyinterfaces_Error_Err(int32_t refnum) {
GoInterfacesError* o = go_seq_objc_from_refnum(refnum);
NSError* error = nil;
BOOL returnVal = [o err:&error];
GoUniverseerror* _error = nil;
id<GoUniverseerror> _error = nil;
if (!returnVal) {
_error = [[goSeqErrorWrapper alloc] initWithError:error];
}

View File

@ -67,7 +67,7 @@ struct cproxyissue12403_Parsable_ToJSON_return cproxyissue12403_Parsable_ToJSON(
NSError* error = nil;
BOOL returnVal = [o toJSON:&ret0_ error:&error];
nstring _ret0_ = go_seq_from_objc_string(ret0_);
GoUniverseerror* _error = nil;
id<GoUniverseerror> _error = nil;
if (!returnVal) {
_error = [[goSeqErrorWrapper alloc] initWithError:error];
}