-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cgen: fix interface method list ordering to make test buildable with …
- Loading branch information
Showing
3 changed files
with
44 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
struct _main__Foo_interface_methods { | ||
void (*_method_a)(void* _); | ||
void (*_method_b)(void* _); | ||
}; | ||
struct _main__Foo_interface_methods main__Foo_name_table[3] = { | ||
{ | ||
._method_a = (void*) main__Bar_a_Interface_main__Foo_method_wrapper, | ||
._method_b = (void*) main__Bar_b_Interface_main__Foo_method_wrapper, | ||
}, | ||
{ | ||
._method_a = (void*) 0, | ||
._method_b = (void*) 0, | ||
}, | ||
{ | ||
._method_a = (void*) main__Baz_a_Interface_main__Foo_method_wrapper, | ||
._method_b = (void*) main__Baz_b_Interface_main__Foo_method_wrapper, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
interface Foo { | ||
a() | ||
b() | ||
} | ||
|
||
struct Bar implements Foo { | ||
} | ||
|
||
fn (b Bar) b() {} | ||
|
||
fn (b Bar) a() {} | ||
|
||
struct Baz implements Foo { | ||
} | ||
|
||
fn (b Baz) b() {} | ||
|
||
fn (b Baz) a() {} |