File tree 3 files changed +17
-0
lines changed
3 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,12 @@ global.Unforgeable = class Unforgeable {
87
87
}
88
88
} ;
89
89
90
+ global . GlobalMethod = class GlobalMethod {
91
+ constructor ( ) {
92
+ this . m = ( ) => 123 ;
93
+ }
94
+ } ;
95
+
90
96
global . PartialInterface = class PartialInterface {
91
97
get un ( ) {
92
98
return 1 ;
Original file line number Diff line number Diff line change @@ -62,6 +62,12 @@ fn optional_method() {
62
62
assert ! ( f. opt( None ) == None ) ;
63
63
}
64
64
65
+ #[ wasm_bindgen_test]
66
+ fn global_method ( ) {
67
+ let f = GlobalMethod :: new ( ) . unwrap ( ) ;
68
+ assert ! ( f. m( ) == 123 ) ;
69
+ }
70
+
65
71
#[ wasm_bindgen_test]
66
72
fn unforgeable_is_structural ( ) {
67
73
let f = Unforgeable :: new ( ) . unwrap ( ) ;
Original file line number Diff line number Diff line change @@ -35,6 +35,11 @@ interface OptionalMethod {
35
35
octet? opt(short ? a);
36
36
};
37
37
38
+ [Global =GlobalMethod , Constructor ()]
39
+ interface GlobalMethod {
40
+ octet m ();
41
+ };
42
+
38
43
[Constructor ()]
39
44
interface Unforgeable {
40
45
[Unforgeable ] readonly attribute short uno;
You can’t perform that action at this time.
0 commit comments