Skip to content

Commit 2114f5c

Browse files
add regression test to .wit file
1 parent bcf79e1 commit 2114f5c

File tree

3 files changed

+15
-22
lines changed

3 files changed

+15
-22
lines changed

crates/rust/tests/codegen.rs

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -235,25 +235,3 @@ mod method_chaining {
235235
enable_method_chaining: true
236236
});
237237
}
238-
239-
// Regression for #1598: world-level `use t.{r};` inside
240-
// `future<result<r, _>>` used to emit unresolved bare `R` in vtable{N}.
241-
#[allow(unused, reason = "testing codegen, not functionality")]
242-
mod issue_1598_future_result_use {
243-
wit_bindgen::generate!({
244-
inline: r#"
245-
package a:b;
246-
247-
world w {
248-
use t.{r};
249-
export f: func() -> future<result<r, string>>;
250-
}
251-
252-
interface t {
253-
record r {
254-
x: u32,
255-
}
256-
}
257-
"#,
258-
});
259-
}

crates/test/src/csharp.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ impl LanguageMethods for Csharp {
4848
| "async-resource-func.wit"
4949
| "import-export-resource.wit"
5050
| "issue-1433.wit"
51+
| "issue-1598.wit"
5152
| "named-fixed-length-list.wit"
5253
| "map.wit"
5354
)

tests/codegen/issue-1598.wit

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
//@ async = true
2+
3+
package a:b;
4+
5+
world w {
6+
use t.{r};
7+
export f: async func() -> future<result<r, string>>;
8+
}
9+
10+
interface t {
11+
record r {
12+
x: u32,
13+
}
14+
}

0 commit comments

Comments
 (0)