You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently objective c declarations are alphabetically ordered which causes an error if a type is referenced before it is declared:
type StructThatStartsWithLetterBeforeZ struct {
Value Z
}
type Z interface {
}
That will produce an error as follows:
In file included from GoLib.m:6:
./GoLib.h:18:7: error: no type or protocol named 'GoLibZ'
- (id<GoLibZ>)value;
^
./GoLib.h:19:22: error: no type or protocol named 'GoLibZ'
- (void)setValue:(id<GoLibZ>)v;
^
GoLib.m:40:12: error: use of undeclared identifier 'GoLibZ'
ret_ = [[GoLibZ alloc] initWithRef:ret__ref];
^
GoLib.m:51:40: error: use of undeclared identifier 'GoLibZ'
if ([(id<NSObject>)(v) isKindOfClass:[GoLibZ class]]) {
^
4 errors generated.
If it is the order, then perhaps pulling all protocol declarations to the top, or topological sort.
The text was updated successfully, but these errors were encountered:
scisci
changed the title
x/mobile/bind: objective-c declaration order wrong when interface has method with same interface arg
x/mobile/bind: objective-c declaration order wrong
Oct 20, 2015
Currently objective c declarations are alphabetically ordered which causes an error if a type is referenced before it is declared:
That will produce an error as follows:
If it is the order, then perhaps pulling all protocol declarations to the top, or topological sort.
The text was updated successfully, but these errors were encountered: