-
Notifications
You must be signed in to change notification settings - Fork 197
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(go): fix the build error of generated code for empty resource type (
#930) * add test cases for issue929 Signed-off-by: Jiaxiao Zhou (Mossaka) <duibao55328@gmail.com> * feat(go): generate exported interfaces when exported_resources are not empty this commit changes the `wit_bindgen_go::interface::Finish()` function to generate the interface functions when either export_funcs are not empty or exported_resources are not empty. Signed-off-by: Jiaxiao Zhou (Mossaka) <duibao55328@gmail.com> * test(go): add one more test Signed-off-by: Jiaxiao Zhou (Mossaka) <duibao55328@gmail.com> * skip issue929 tests for rust Signed-off-by: Jiaxiao Zhou (Mossaka) <duibao55328@gmail.com> * skip issue929 tests for teavm-java Signed-off-by: Jiaxiao Zhou (Mossaka) <duibao55328@gmail.com> * skip issue929 tests for csharp Signed-off-by: Jiaxiao Zhou (Mossaka) <duibao55328@gmail.com> --------- Signed-off-by: Jiaxiao Zhou (Mossaka) <duibao55328@gmail.com>
- Loading branch information
Showing
9 changed files
with
81 additions
and
1 deletion.
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
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
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,14 @@ | ||
package foo:bar; | ||
|
||
interface f { | ||
resource fd; | ||
} | ||
|
||
interface utils { | ||
use f.{fd}; | ||
my-func: func() -> own<fd>; | ||
} | ||
|
||
world test { | ||
export utils; | ||
} |
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,15 @@ | ||
package foo:bar; | ||
|
||
interface f { | ||
resource fd; | ||
} | ||
|
||
interface utils { | ||
use f.{fd}; | ||
my-func: func() -> own<fd>; | ||
} | ||
|
||
world test { | ||
export f; | ||
export utils; | ||
} |
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,19 @@ | ||
package foo:bar; | ||
|
||
interface f { | ||
resource fd { | ||
get-a: func() -> s32; | ||
set-a: func(a: s32); | ||
} | ||
} | ||
|
||
interface utils { | ||
use f.{fd}; | ||
my-func: func() -> own<fd>; | ||
} | ||
|
||
world test { | ||
import f; | ||
export f; | ||
export utils; | ||
} |
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,16 @@ | ||
package foo:bar; | ||
|
||
interface f { | ||
resource fd; | ||
} | ||
|
||
interface utils { | ||
use f.{fd}; | ||
my-func: func() -> own<fd>; | ||
} | ||
|
||
world test { | ||
import f; | ||
export f; | ||
export utils; | ||
} |