Skip to content

Commit

Permalink
Merge pull request #131 from ydnar/ydnar/tuple-record-fixes
Browse files Browse the repository at this point in the history
all: support zero-length tuple and record types, complex tuples with > 8 fields
  • Loading branch information
ydnar authored Jul 8, 2024
2 parents 16f9943 + 34c7a3a commit 671aa8d
Show file tree
Hide file tree
Showing 12 changed files with 815 additions and 119 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added
- [#128](https://github.com/ydnar/wasm-tools-go/pull/128): implemented `String` method for `enum` types ([@rajatjindal](https://github.com/rajatjindal)).

### Fixed
- [#130](https://github.com/ydnar/wasm-tools-go/issues/130): anonymous `tuple` types now correctly have exported Go struct fields.
- [#129](https://github.com/ydnar/wasm-tools-go/issues/129): correctly handle zero-length `tuple` and `record` types, represented as `struct{}`.

## [v0.1.2] — 2024-07-05

### Added
Expand Down
5 changes: 5 additions & 0 deletions testdata/example/non-flat-params.wit
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
package example:non-flat-params;

interface corner-case {
type t0 = tuple<>;
type t4 = tuple<u32, u32, u32, u32>;
type t16 = tuple<t4, t4, t4, t4>;
type t32 = tuple<t16, t16>;

f: func();

f0-void: func(t: tuple<>);
f0-u32: func(t: tuple<>) -> u32;
f0-t0: func(t: tuple<>) -> t0;

f4-void: func(t: t4);
f4-u32: func(t: t4) -> u32;
f4-t4: func(t: t4) -> t4;
Expand Down
Loading

0 comments on commit 671aa8d

Please sign in to comment.