File tree Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -216,7 +216,7 @@ pub(crate) fn from_checked_anyfunc(
216
216
store : & Store ,
217
217
) -> Val {
218
218
if item. type_index == wasmtime_runtime:: VMSharedSignatureIndex :: default ( ) {
219
- Val :: AnyRef ( AnyRef :: Null ) ;
219
+ return Val :: AnyRef ( AnyRef :: Null ) ;
220
220
}
221
221
let instance_handle = unsafe { wasmtime_runtime:: InstanceHandle :: from_vmctx ( item. vmctx ) } ;
222
222
let export = wasmtime_runtime:: ExportFunction {
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ mod linker;
14
14
mod memory_creator;
15
15
mod name;
16
16
mod stack_overflow;
17
+ mod table;
17
18
mod traps;
18
19
mod use_after_drop;
19
20
mod wast;
Original file line number Diff line number Diff line change
1
+ use wasmtime:: * ;
2
+
3
+ #[ test]
4
+ fn get_none ( ) {
5
+ let store = Store :: default ( ) ;
6
+ let ty = TableType :: new ( ValType :: FuncRef , Limits :: new ( 1 , None ) ) ;
7
+ let table = Table :: new ( & store, ty, Val :: AnyRef ( AnyRef :: Null ) ) . unwrap ( ) ;
8
+ match table. get ( 0 ) {
9
+ Some ( Val :: AnyRef ( AnyRef :: Null ) ) => { }
10
+ _ => panic ! ( ) ,
11
+ }
12
+ assert ! ( table. get( 1 ) . is_none( ) ) ;
13
+ }
You can’t perform that action at this time.
0 commit comments