@@ -0,0 +1,34 @@
+{ %cpu=wasm32 }
+{ %norun }
+
+program twasmfuncref1;
+{$MODE fpc}
+type
+ TWasmFuncRef = function(a: longint; b: int64): longint; WasmFuncRef;
+procedure testproc;
+var
+ p: TWasmFuncRef;
+begin
+end;
+procedure testproc2(q: TWasmFuncRef);
+function testproc3: TWasmFuncRef;
+function testproc4(a, b, c: longint; d: TWasmFuncRef; e: int64): TWasmFuncRef;
+ q: TWasmFuncRef;
+ q := d;
+ testproc4 := q;
+end.
+{$MODE tp}