goscript 0.0.13 → 0.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (186) hide show
  1. package/LICENSE +2 -1
  2. package/README.md +163 -45
  3. package/builtin/builtin.ts +1169 -178
  4. package/cmd/goscript/cmd_compile.go +2 -2
  5. package/compiler/analysis.go +726 -0
  6. package/compiler/compiler.go +5701 -4
  7. package/compiler/compiler_test.go +104 -0
  8. package/compiler/config.go +3 -3
  9. package/compiler/config_test.go +89 -0
  10. package/compiler/index.ts +1 -1
  11. package/compiler/output.go +26 -0
  12. package/compiler/write-type-spec.go +506 -0
  13. package/compiler/writer.go +11 -0
  14. package/dist/builtin/builtin.d.ts +204 -67
  15. package/dist/builtin/builtin.js +846 -144
  16. package/dist/builtin/builtin.js.map +1 -1
  17. package/dist/compiler/index.d.ts +1 -1
  18. package/go.mod +5 -6
  19. package/go.sum +6 -11
  20. package/package.json +21 -5
  21. package/compiler/compile.go +0 -190
  22. package/compiler/compile_comment.go +0 -41
  23. package/compiler/compile_decls.go +0 -84
  24. package/compiler/compile_expr.go +0 -1022
  25. package/compiler/compile_field.go +0 -110
  26. package/compiler/compile_spec.go +0 -566
  27. package/compiler/compile_stmt.go +0 -1616
  28. package/compiler/context.go +0 -9
  29. package/compiler/file_compiler.go +0 -80
  30. package/compiler/output_path.go +0 -31
  31. package/compiler/pkg_compiler.go +0 -72
  32. package/compiler/types/tokens.go +0 -66
  33. package/compiler/types/types.go +0 -46
  34. package/dist/compliance/tests/array_literal/array_literal.gs.d.ts +0 -1
  35. package/dist/compliance/tests/array_literal/array_literal.gs.js +0 -15
  36. package/dist/compliance/tests/array_literal/array_literal.gs.js.map +0 -1
  37. package/dist/compliance/tests/async_basic/async_basic.gs.d.ts +0 -1
  38. package/dist/compliance/tests/async_basic/async_basic.gs.js +0 -24
  39. package/dist/compliance/tests/async_basic/async_basic.gs.js.map +0 -1
  40. package/dist/compliance/tests/async_defer_statement/async_defer_statement.gs.d.ts +0 -1
  41. package/dist/compliance/tests/async_defer_statement/async_defer_statement.gs.js +0 -82
  42. package/dist/compliance/tests/async_defer_statement/async_defer_statement.gs.js.map +0 -1
  43. package/dist/compliance/tests/basic_arithmetic/basic_arithmetic.gs.d.ts +0 -1
  44. package/dist/compliance/tests/basic_arithmetic/basic_arithmetic.gs.js +0 -16
  45. package/dist/compliance/tests/basic_arithmetic/basic_arithmetic.gs.js.map +0 -1
  46. package/dist/compliance/tests/boolean_logic/boolean_logic.gs.d.ts +0 -1
  47. package/dist/compliance/tests/boolean_logic/boolean_logic.gs.js +0 -14
  48. package/dist/compliance/tests/boolean_logic/boolean_logic.gs.js.map +0 -1
  49. package/dist/compliance/tests/channel_basic/channel_basic.gs.d.ts +0 -1
  50. package/dist/compliance/tests/channel_basic/channel_basic.gs.js +0 -14
  51. package/dist/compliance/tests/channel_basic/channel_basic.gs.js.map +0 -1
  52. package/dist/compliance/tests/composite_literal_assignment/composite_literal_assignment.gs.d.ts +0 -1
  53. package/dist/compliance/tests/composite_literal_assignment/composite_literal_assignment.gs.js +0 -27
  54. package/dist/compliance/tests/composite_literal_assignment/composite_literal_assignment.gs.js.map +0 -1
  55. package/dist/compliance/tests/constants/constants.gs.d.ts +0 -1
  56. package/dist/compliance/tests/constants/constants.gs.js +0 -16
  57. package/dist/compliance/tests/constants/constants.gs.js.map +0 -1
  58. package/dist/compliance/tests/copy_independence/copy_independence.gs.d.ts +0 -1
  59. package/dist/compliance/tests/copy_independence/copy_independence.gs.js +0 -33
  60. package/dist/compliance/tests/copy_independence/copy_independence.gs.js.map +0 -1
  61. package/dist/compliance/tests/defer_statement/defer_statement.gs.d.ts +0 -1
  62. package/dist/compliance/tests/defer_statement/defer_statement.gs.js +0 -75
  63. package/dist/compliance/tests/defer_statement/defer_statement.gs.js.map +0 -1
  64. package/dist/compliance/tests/embedded_interface_assertion/embedded_interface_assertion.gs.d.ts +0 -1
  65. package/dist/compliance/tests/embedded_interface_assertion/embedded_interface_assertion.gs.js +0 -37
  66. package/dist/compliance/tests/embedded_interface_assertion/embedded_interface_assertion.gs.js.map +0 -1
  67. package/dist/compliance/tests/flag_bitwise_op/flag_bitwise_op.gs.d.ts +0 -1
  68. package/dist/compliance/tests/flag_bitwise_op/flag_bitwise_op.gs.js +0 -29
  69. package/dist/compliance/tests/flag_bitwise_op/flag_bitwise_op.gs.js.map +0 -1
  70. package/dist/compliance/tests/float64/float64.gs.d.ts +0 -1
  71. package/dist/compliance/tests/float64/float64.gs.js +0 -24
  72. package/dist/compliance/tests/float64/float64.gs.js.map +0 -1
  73. package/dist/compliance/tests/for_loop_basic/for_loop_basic.gs.d.ts +0 -1
  74. package/dist/compliance/tests/for_loop_basic/for_loop_basic.gs.js +0 -10
  75. package/dist/compliance/tests/for_loop_basic/for_loop_basic.gs.js.map +0 -1
  76. package/dist/compliance/tests/for_loop_condition_only/for_loop_condition_only.gs.d.ts +0 -1
  77. package/dist/compliance/tests/for_loop_condition_only/for_loop_condition_only.gs.js +0 -11
  78. package/dist/compliance/tests/for_loop_condition_only/for_loop_condition_only.gs.js.map +0 -1
  79. package/dist/compliance/tests/for_loop_condition_only/main.gs.d.ts +0 -1
  80. package/dist/compliance/tests/for_loop_condition_only/main.gs.js +0 -10
  81. package/dist/compliance/tests/for_loop_condition_only/main.gs.js.map +0 -1
  82. package/dist/compliance/tests/for_loop_infinite/for_loop_infinite.gs.d.ts +0 -1
  83. package/dist/compliance/tests/for_loop_infinite/for_loop_infinite.gs.js +0 -14
  84. package/dist/compliance/tests/for_loop_infinite/for_loop_infinite.gs.js.map +0 -1
  85. package/dist/compliance/tests/for_range/for_range.gs.d.ts +0 -1
  86. package/dist/compliance/tests/for_range/for_range.gs.js +0 -39
  87. package/dist/compliance/tests/for_range/for_range.gs.js.map +0 -1
  88. package/dist/compliance/tests/for_range_index_use/for_range_index_use.gs.d.ts +0 -1
  89. package/dist/compliance/tests/for_range_index_use/for_range_index_use.gs.js +0 -15
  90. package/dist/compliance/tests/for_range_index_use/for_range_index_use.gs.js.map +0 -1
  91. package/dist/compliance/tests/func_literal/func_literal.gs.d.ts +0 -1
  92. package/dist/compliance/tests/func_literal/func_literal.gs.js +0 -10
  93. package/dist/compliance/tests/func_literal/func_literal.gs.js.map +0 -1
  94. package/dist/compliance/tests/function_call_result_assignment/function_call_result_assignment.gs.d.ts +0 -12
  95. package/dist/compliance/tests/function_call_result_assignment/function_call_result_assignment.gs.js +0 -30
  96. package/dist/compliance/tests/function_call_result_assignment/function_call_result_assignment.gs.js.map +0 -1
  97. package/dist/compliance/tests/if_statement/if_statement.gs.d.ts +0 -1
  98. package/dist/compliance/tests/if_statement/if_statement.gs.js +0 -13
  99. package/dist/compliance/tests/if_statement/if_statement.gs.js.map +0 -1
  100. package/dist/compliance/tests/interface_method_comments/interface_method_comments.gs.d.ts +0 -1
  101. package/dist/compliance/tests/interface_method_comments/interface_method_comments.gs.js +0 -12
  102. package/dist/compliance/tests/interface_method_comments/interface_method_comments.gs.js.map +0 -1
  103. package/dist/compliance/tests/interface_multi_param_return/interface_multi_param_return.gs.d.ts +0 -1
  104. package/dist/compliance/tests/interface_multi_param_return/interface_multi_param_return.gs.js +0 -34
  105. package/dist/compliance/tests/interface_multi_param_return/interface_multi_param_return.gs.js.map +0 -1
  106. package/dist/compliance/tests/interface_to_interface_type_assertion/interface_to_interface_type_assertion.gs.d.ts +0 -1
  107. package/dist/compliance/tests/interface_to_interface_type_assertion/interface_to_interface_type_assertion.gs.js +0 -32
  108. package/dist/compliance/tests/interface_to_interface_type_assertion/interface_to_interface_type_assertion.gs.js.map +0 -1
  109. package/dist/compliance/tests/interface_type_assertion/interface_type_assertion.gs.d.ts +0 -1
  110. package/dist/compliance/tests/interface_type_assertion/interface_type_assertion.gs.js +0 -40
  111. package/dist/compliance/tests/interface_type_assertion/interface_type_assertion.gs.js.map +0 -1
  112. package/dist/compliance/tests/interface_type_assertion_signature_mismatch/interface_type_assertion_signature_mismatch.gs.d.ts +0 -1
  113. package/dist/compliance/tests/interface_type_assertion_signature_mismatch/interface_type_assertion_signature_mismatch.gs.js +0 -51
  114. package/dist/compliance/tests/interface_type_assertion_signature_mismatch/interface_type_assertion_signature_mismatch.gs.js.map +0 -1
  115. package/dist/compliance/tests/map_support/map_support.gs.d.ts +0 -1
  116. package/dist/compliance/tests/map_support/map_support.gs.js +0 -88
  117. package/dist/compliance/tests/map_support/map_support.gs.js.map +0 -1
  118. package/dist/compliance/tests/method_call_on_pointer_receiver/method_call_on_pointer_receiver.gs.d.ts +0 -1
  119. package/dist/compliance/tests/method_call_on_pointer_receiver/method_call_on_pointer_receiver.gs.js +0 -24
  120. package/dist/compliance/tests/method_call_on_pointer_receiver/method_call_on_pointer_receiver.gs.js.map +0 -1
  121. package/dist/compliance/tests/method_call_on_pointer_via_value/method_call_on_pointer_via_value.gs.d.ts +0 -1
  122. package/dist/compliance/tests/method_call_on_pointer_via_value/method_call_on_pointer_via_value.gs.js +0 -33
  123. package/dist/compliance/tests/method_call_on_pointer_via_value/method_call_on_pointer_via_value.gs.js.map +0 -1
  124. package/dist/compliance/tests/method_call_on_value_receiver/method_call_on_value_receiver.gs.d.ts +0 -1
  125. package/dist/compliance/tests/method_call_on_value_receiver/method_call_on_value_receiver.gs.js +0 -22
  126. package/dist/compliance/tests/method_call_on_value_receiver/method_call_on_value_receiver.gs.js.map +0 -1
  127. package/dist/compliance/tests/method_call_on_value_via_pointer/method_call_on_value_via_pointer.gs.d.ts +0 -1
  128. package/dist/compliance/tests/method_call_on_value_via_pointer/method_call_on_value_via_pointer.gs.js +0 -33
  129. package/dist/compliance/tests/method_call_on_value_via_pointer/method_call_on_value_via_pointer.gs.js.map +0 -1
  130. package/dist/compliance/tests/multiple_return_values/multiple_return_values.gs.d.ts +0 -1
  131. package/dist/compliance/tests/multiple_return_values/multiple_return_values.gs.js +0 -17
  132. package/dist/compliance/tests/multiple_return_values/multiple_return_values.gs.js.map +0 -1
  133. package/dist/compliance/tests/pointer_assignment_no_copy/pointer_assignment_no_copy.gs.d.ts +0 -1
  134. package/dist/compliance/tests/pointer_assignment_no_copy/pointer_assignment_no_copy.gs.js +0 -29
  135. package/dist/compliance/tests/pointer_assignment_no_copy/pointer_assignment_no_copy.gs.js.map +0 -1
  136. package/dist/compliance/tests/pointer_composite_literal_assignment/pointer_composite_literal_assignment.gs.d.ts +0 -1
  137. package/dist/compliance/tests/pointer_composite_literal_assignment/pointer_composite_literal_assignment.gs.js +0 -27
  138. package/dist/compliance/tests/pointer_composite_literal_assignment/pointer_composite_literal_assignment.gs.js.map +0 -1
  139. package/dist/compliance/tests/pointer_deref_multiassign/pointer_deref_multiassign.gs.d.ts +0 -1
  140. package/dist/compliance/tests/pointer_deref_multiassign/pointer_deref_multiassign.gs.js +0 -22
  141. package/dist/compliance/tests/pointer_deref_multiassign/pointer_deref_multiassign.gs.js.map +0 -1
  142. package/dist/compliance/tests/pointer_initialization/pointer_initialization.gs.d.ts +0 -1
  143. package/dist/compliance/tests/pointer_initialization/pointer_initialization.gs.js +0 -20
  144. package/dist/compliance/tests/pointer_initialization/pointer_initialization.gs.js.map +0 -1
  145. package/dist/compliance/tests/select_receive_on_closed_channel_no_default/select_receive_on_closed_channel_no_default.gs.d.ts +0 -1
  146. package/dist/compliance/tests/select_receive_on_closed_channel_no_default/select_receive_on_closed_channel_no_default.gs.js +0 -28
  147. package/dist/compliance/tests/select_receive_on_closed_channel_no_default/select_receive_on_closed_channel_no_default.gs.js.map +0 -1
  148. package/dist/compliance/tests/select_send_on_full_buffered_channel_with_default/select_send_on_full_buffered_channel_with_default.gs.d.ts +0 -1
  149. package/dist/compliance/tests/select_send_on_full_buffered_channel_with_default/select_send_on_full_buffered_channel_with_default.gs.js +0 -30
  150. package/dist/compliance/tests/select_send_on_full_buffered_channel_with_default/select_send_on_full_buffered_channel_with_default.gs.js.map +0 -1
  151. package/dist/compliance/tests/select_statement/select_statement.gs.d.ts +0 -1
  152. package/dist/compliance/tests/select_statement/select_statement.gs.js +0 -207
  153. package/dist/compliance/tests/select_statement/select_statement.gs.js.map +0 -1
  154. package/dist/compliance/tests/simple/simple.gs.d.ts +0 -1
  155. package/dist/compliance/tests/simple/simple.gs.js +0 -6
  156. package/dist/compliance/tests/simple/simple.gs.js.map +0 -1
  157. package/dist/compliance/tests/simple_deref_assignment/simple_deref_assignment.gs.d.ts +0 -1
  158. package/dist/compliance/tests/simple_deref_assignment/simple_deref_assignment.gs.js +0 -24
  159. package/dist/compliance/tests/simple_deref_assignment/simple_deref_assignment.gs.js.map +0 -1
  160. package/dist/compliance/tests/slices/slices.gs.d.ts +0 -1
  161. package/dist/compliance/tests/slices/slices.gs.js +0 -294
  162. package/dist/compliance/tests/slices/slices.gs.js.map +0 -1
  163. package/dist/compliance/tests/string_conversion/string_conversion.gs.d.ts +0 -1
  164. package/dist/compliance/tests/string_conversion/string_conversion.gs.js +0 -41
  165. package/dist/compliance/tests/string_conversion/string_conversion.gs.js.map +0 -1
  166. package/dist/compliance/tests/string_rune_conversion/string_rune_conversion.gs.d.ts +0 -1
  167. package/dist/compliance/tests/string_rune_conversion/string_rune_conversion.gs.js +0 -17
  168. package/dist/compliance/tests/string_rune_conversion/string_rune_conversion.gs.js.map +0 -1
  169. package/dist/compliance/tests/struct_embedding/struct_embedding.gs.d.ts +0 -1
  170. package/dist/compliance/tests/struct_embedding/struct_embedding.gs.js +0 -48
  171. package/dist/compliance/tests/struct_embedding/struct_embedding.gs.js.map +0 -1
  172. package/dist/compliance/tests/struct_field_access/struct_field_access.gs.d.ts +0 -1
  173. package/dist/compliance/tests/struct_field_access/struct_field_access.gs.js +0 -19
  174. package/dist/compliance/tests/struct_field_access/struct_field_access.gs.js.map +0 -1
  175. package/dist/compliance/tests/struct_pointer_interface_fields/struct_pointer_interface_fields.gs.d.ts +0 -1
  176. package/dist/compliance/tests/struct_pointer_interface_fields/struct_pointer_interface_fields.gs.js +0 -26
  177. package/dist/compliance/tests/struct_pointer_interface_fields/struct_pointer_interface_fields.gs.js.map +0 -1
  178. package/dist/compliance/tests/struct_value_init_clone/struct_value_init_clone.gs.d.ts +0 -1
  179. package/dist/compliance/tests/struct_value_init_clone/struct_value_init_clone.gs.js +0 -30
  180. package/dist/compliance/tests/struct_value_init_clone/struct_value_init_clone.gs.js.map +0 -1
  181. package/dist/compliance/tests/switch_statement/switch_statement.gs.d.ts +0 -1
  182. package/dist/compliance/tests/switch_statement/switch_statement.gs.js +0 -76
  183. package/dist/compliance/tests/switch_statement/switch_statement.gs.js.map +0 -1
  184. package/dist/compliance/tests/value_type_copy_behavior/value_type_copy_behavior.gs.d.ts +0 -1
  185. package/dist/compliance/tests/value_type_copy_behavior/value_type_copy_behavior.gs.js +0 -31
  186. package/dist/compliance/tests/value_type_copy_behavior/value_type_copy_behavior.gs.js.map +0 -1
@@ -1,51 +0,0 @@
1
- // Generated file based on interface_type_assertion_signature_mismatch.go
2
- // Updated when compliance tests are re-run, DO NOT EDIT!
3
- import * as goscript from "@goscript/builtin";
4
- // Register this interface with the runtime type system
5
- const InterfaceA__typeInfo = goscript.registerType('InterfaceA', goscript.TypeKind.Interface, null, new Set(['DoSomething']), undefined);
6
- // Register this interface with the runtime type system
7
- const InterfaceB__typeInfo = goscript.registerType('InterfaceB', goscript.TypeKind.Interface, null, new Set(['DoSomething']), undefined);
8
- class MyStruct {
9
- Name = "";
10
- DoSomething(val) {
11
- const m = this;
12
- console.log("MyStruct.DoSomething called");
13
- return "done";
14
- }
15
- constructor(init) { if (init)
16
- Object.assign(this, init); }
17
- clone() { return Object.assign(Object.create(MyStruct.prototype), this); }
18
- // Register this type with the runtime type system
19
- static __typeInfo = goscript.registerType('MyStruct', goscript.TypeKind.Struct, new MyStruct(), new Set(['DoSomething']), MyStruct);
20
- }
21
- export async function main() {
22
- let a;
23
- let s = new MyStruct({ Name: "TestStruct" });
24
- a = s.clone();
25
- // This assertion should fail at runtime because InterfaceB.DoSomething has a different signature
26
- let { ok: ok } = goscript.typeAssert(a, 'InterfaceB');
27
- if (ok) {
28
- console.log("Type assertion to InterfaceB successful");
29
- }
30
- else {
31
- console.log("Type assertion to InterfaceB failed");
32
- }
33
- // This assertion should succeed
34
- ({ ok: ok } = goscript.typeAssert(a, 'InterfaceA'));
35
- if (ok) {
36
- console.log("Type assertion to InterfaceA successful");
37
- }
38
- else {
39
- console.log("Type assertion to InterfaceA failed");
40
- }
41
- // Call the method on the asserted interface to ensure the generated code works
42
- // This is not strictly necessary for the type assertion test but good practice
43
- // if the assertion to InterfaceA succeeds.
44
- {
45
- let { value: assertedA, ok: ok } = goscript.typeAssert(a, 'InterfaceA');
46
- if (ok) {
47
- assertedA.DoSomething(123);
48
- }
49
- }
50
- }
51
- //# sourceMappingURL=interface_type_assertion_signature_mismatch.gs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"interface_type_assertion_signature_mismatch.gs.js","sourceRoot":"","sources":["../../../../compliance/tests/interface_type_assertion_signature_mismatch/interface_type_assertion_signature_mismatch.gs.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,yDAAyD;AAEzD,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAC;AAM9C,uDAAuD;AACvD,MAAM,oBAAoB,GAAG,QAAQ,CAAC,YAAY,CAChD,YAAY,EACZ,QAAQ,CAAC,QAAQ,CAAC,SAAS,EAC3B,IAAI,EACJ,IAAI,GAAG,CAAC,CAAC,aAAa,CAAC,CAAC,EACxB,SAAS,CACV,CAAC;AAMF,uDAAuD;AACvD,MAAM,oBAAoB,GAAG,QAAQ,CAAC,YAAY,CAChD,YAAY,EACZ,QAAQ,CAAC,QAAQ,CAAC,SAAS,EAC3B,IAAI,EACJ,IAAI,GAAG,CAAC,CAAC,aAAa,CAAC,CAAC,EACxB,SAAS,CACV,CAAC;AAEF,MAAM,QAAQ;IACN,IAAI,GAAW,EAAE,CAAC;IAElB,WAAW,CAAC,GAAW;QAC7B,MAAM,CAAC,GAAG,IAAI,CAAA;QACd,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAA;QAC1C,OAA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A;IACnD,CAAC;IAED,+EAA+E;IAC/E,+EAA+E;IAC/E,2CAA2C;IAC3C,CAAC;QAAA,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,QAAQ,CAAC,UAAU,CAAa,CAAC,EAAE,YAAY,CAAC,CAAA;QACnF,IAAI,EAAE,EAAE,CAAC;YACR,SAAS,CAAC,WAAW,CAAC,GAAG,CAAC,CAAA;QAC3B,CAAC;IACF,CAAC;AAAA,CAAC"}
@@ -1 +0,0 @@
1
- export declare function main(): Promise<void>;
@@ -1,88 +0,0 @@
1
- // Generated file based on map_support.go
2
- // Updated when compliance tests are re-run, DO NOT EDIT!
3
- import * as goscript from "@goscript/builtin";
4
- export async function main() {
5
- // Create map using make
6
- let scores = goscript.makeMap();
7
- console.log("Empty map created: Expected: true, Actual:", goscript.len(scores) == 0);
8
- // Add key-value pairs
9
- goscript.mapSet(scores, "Alice", 90);
10
- goscript.mapSet(scores, "Bob", 85);
11
- goscript.mapSet(scores, "Charlie", 92);
12
- // Map size
13
- console.log("Map size after adding 3 items: Expected: 3, Actual:", goscript.len(scores));
14
- // Access values
15
- console.log("Alice's score: Expected: 90, Actual:", scores.get("Alice"));
16
- console.log("Bob's score: Expected: 85, Actual:", scores.get("Bob"));
17
- // Modify a value
18
- goscript.mapSet(scores, "Bob", 88);
19
- console.log("Bob's updated score: Expected: 88, Actual:", scores.get("Bob"));
20
- // Check if key exists (comma-ok idiom)
21
- let value;
22
- let exists;
23
- exists = scores.has("David");
24
- value = scores.get("David") ?? 0;
25
- console.log("Does David exist in map? Expected: false, Actual:", exists);
26
- console.log("Value for non-existent key: Expected: 0, Actual:", value);
27
- // Delete a key
28
- goscript.deleteMapEntry(scores, "Charlie");
29
- exists = scores.has("Charlie");
30
- console.log("After delete, does Charlie exist? Expected: false, Actual:", exists);
31
- // Create map with literal syntax
32
- let colors = new Map([["red", "#ff0000"], ["green", "#00ff00"], ["blue", "#0000ff"]]);
33
- console.log("Map literal size: Expected: 3, Actual:", goscript.len(colors));
34
- console.log("Color code for red: Expected: #ff0000, Actual:", colors.get("red"));
35
- // Iterate over a map with range
36
- console.log("Iterating over scores map:");
37
- // Note: Map iteration is not ordered in Go, so we will collect the results and sort them for consistent test output.
38
- let scoreResults = [];
39
- // Using string concatenation to build the output string
40
- for (const [k, v] of scores.entries()) {
41
- const name = k;
42
- const score = v;
43
- {
44
- // Using string concatenation to build the output string
45
- let result = " - Name: " + name + " Score: " + itoa(score);
46
- scoreResults = goscript.append(scoreResults, result);
47
- }
48
- }
49
- // Inline bubble sort for string slice
50
- // (avoid importing sort package yet)
51
- let n = goscript.len(scoreResults);
52
- for (let i = 0; i < n - 1; i++) {
53
- for (let j = 0; j < n - i - 1; j++) {
54
- if (scoreResults[j] > scoreResults[j + 1]) {
55
- scoreResults[j] = scoreResults[j + 1];
56
- scoreResults[j + 1] = scoreResults[j];
57
- }
58
- }
59
- }
60
- for (let i = 0; i < scoreResults.length; i++) {
61
- const result = scoreResults[i];
62
- {
63
- console.log(result);
64
- }
65
- }
66
- }
67
- // Helper function to convert int to string
68
- // (avoid importing strings package)
69
- function itoa(i) {
70
- if (i == 0) {
71
- return "0";
72
- }
73
- let s = "";
74
- let isNegative = false;
75
- if (i < 0) {
76
- isNegative = true;
77
- i = -i;
78
- }
79
- for (; i > 0;) {
80
- s = String.fromCharCode(i % 10 + 48) + s;
81
- i = Math.floor(i / 10);
82
- }
83
- if (isNegative) {
84
- s = "-" + s;
85
- }
86
- return s;
87
- }
88
- //# sourceMappingURL=map_support.gs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"map_support.gs.js","sourceRoot":"","sources":["../../../../compliance/tests/map_support/map_support.gs.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,yDAAyD;AAEzD,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAC;AAE9C,MAAM,CAAC,KAAK,UAAU,IAAI;IACzB,wBAAwB;IACxB,IAAI,MAAM,GAAG,QAAQ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,GAAG,CAAC,CAAA;IACZ,CAAC;IACD,OAAO,CAAC,CAAA;AACT,CAAC"}
@@ -1 +0,0 @@
1
- export declare function main(): Promise<void>;
@@ -1,24 +0,0 @@
1
- // Generated file based on method_call_on_pointer_receiver.go
2
- // Updated when compliance tests are re-run, DO NOT EDIT!
3
- import * as goscript from "@goscript/builtin";
4
- class MyStruct {
5
- MyInt = 0;
6
- MyString = "";
7
- // GetMyString returns the MyString field.
8
- GetMyString() {
9
- const m = this;
10
- return m.MyString;
11
- }
12
- constructor(init) { if (init)
13
- Object.assign(this, init); }
14
- clone() { return Object.assign(Object.create(MyStruct.prototype), this); }
15
- // Register this type with the runtime type system
16
- static __typeInfo = goscript.registerType('MyStruct', goscript.TypeKind.Struct, new MyStruct(), new Set(['GetMyString']), MyStruct);
17
- }
18
- export async function main() {
19
- let structPointer = new MyStruct({ MyInt: 4, MyString: "hello world" });
20
- // === Method Call on Pointer Receiver ===
21
- // Calling a method with a pointer receiver (*MyStruct) using a pointer variable.
22
- console.log("Method call on pointer (structPointer): Expected: hello world, Actual: " + structPointer.GetMyString());
23
- }
24
- //# sourceMappingURL=method_call_on_pointer_receiver.gs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"method_call_on_pointer_receiver.gs.js","sourceRoot":"","sources":["../../../../compliance/tests/method_call_on_pointer_receiver/method_call_on_pointer_receiver.gs.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,yDAAyD;AAEzD,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAC;AAE9C,MAAM,QAAQ;IACN,KAAK,GAAW,CAAC,CAAC;IAClB,QAAQ,GAAW,EAAE,CAAC;IAE7B,0CAA0C;IACnC,WAAW;QACjB,MAAM,CAAC,GAAG,IAAI,CAAA;QACd,OAAO,CAAC,CAAC,QAAQ,CAAA;IAClB,CAAC;IAED,YAAY,IAAwB,IAAI,IAAI,IAAI;QAAE,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAW,CAAC,CAAC,CAAC,CAAC;IAC9E,KAAK,KAAe,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAa,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;IAEvG,kDAAkD;IAClD,MAAM,CAAC,UAAU,GAAG,QAAQ,CAAC,YAAY,CACvC,UAAU,EACV,QAAQ,CAAC,QAAQ,CAAC,MAAM,EACxB,IAAI,QAAQ,EAAE,EACd,IAAI,GAAG,CAAC,CAAC,aAAa,CAAC,CAAC,EACxB,QAAQ,CACT,CAAC;;AAGH,MAAM,CAAC,KAAK,UAAU,IAAI;IACzB,IAAI,aAAa,GAAG,IAAI,QAAQ,CAAC,EAAC,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,aAAa,EAAC,CAAC,CAAA;IACrE,0CAA0C;IAC1C,iFAAiF;IACjF,OAAO,CAAC,GAAG,CAAC,yEAAyE,GAAG,aAAa,CAAC,WAAW,EAAE,CAAC,CAAA;AACrH,CAAC"}
@@ -1 +0,0 @@
1
- export declare function main(): Promise<void>;
@@ -1,33 +0,0 @@
1
- // Generated file based on method_call_on_pointer_via_value.go
2
- // Updated when compliance tests are re-run, DO NOT EDIT!
3
- import * as goscript from "@goscript/builtin";
4
- class MyStruct {
5
- MyInt = 0;
6
- // SetValue sets the MyInt field (pointer receiver).
7
- SetValue(v) {
8
- const m = this;
9
- m.MyInt = v;
10
- }
11
- // GetValue returns the MyInt field (value receiver for verification).
12
- GetValue() {
13
- const m = this;
14
- return m.MyInt;
15
- }
16
- constructor(init) { if (init)
17
- Object.assign(this, init); }
18
- clone() { return Object.assign(Object.create(MyStruct.prototype), this); }
19
- // Register this type with the runtime type system
20
- static __typeInfo = goscript.registerType('MyStruct', goscript.TypeKind.Struct, new MyStruct(), new Set(['SetValue', 'GetValue']), MyStruct);
21
- }
22
- export async function main() {
23
- // Create a struct value
24
- let msValue = new MyStruct({ MyInt: 100 });
25
- // === Method Call on Pointer Receiver via Value ===
26
- // Call the pointer-receiver method using the value variable.
27
- // Go implicitly takes the address of msValue (&msValue) to call SetValue.
28
- msValue.SetValue(200);
29
- // Verify the value was modified through the method call.
30
- // Expected: 200
31
- console.log("Value after pointer method call via value: Expected: 200, Actual:", msValue.GetValue());
32
- }
33
- //# sourceMappingURL=method_call_on_pointer_via_value.gs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"method_call_on_pointer_via_value.gs.js","sourceRoot":"","sources":["../../../../compliance/tests/method_call_on_pointer_via_value/method_call_on_pointer_via_value.gs.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,yDAAyD;AAEzD,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAC;AAE9C,MAAM,QAAQ;IACN,KAAK,GAAW,CAAC,CAAC;IAEzB,oDAAoD;IAC7C,QAAQ,CAAC,CAAS;QACxB,MAAM,CAAC,GAAG,IAAI,CAAA;QACd,CAAC,CAAC,KAAK,GAAG,CAAC,CAAA;IACZ,CAAC;IAED,sEAAsE;IAC/D,QAAQ;QACd,MAAM,CAAC,GAAG,IAAI,CAAA;QACd,OAAO,CAAC,CAAC,KAAK,CAAA;IACf,CAAC;IAED,YAAY,IAAwB,IAAI,IAAI,IAAI;QAAE,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAW,CAAC,CAAC,CAAC,CAAC;IAC9E,KAAK,KAAe,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAa,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;IAEvG,kDAAkD;IAClD,MAAM,CAAC,UAAU,GAAG,QAAQ,CAAC,YAAY,CACvC,UAAU,EACV,QAAQ,CAAC,QAAQ,CAAC,MAAM,EACxB,IAAI,QAAQ,EAAE,EACd,IAAI,GAAG,CAAC,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC,EACjC,QAAQ,CACT,CAAC;;AAGH,MAAM,CAAC,KAAK,UAAU,IAAI;IACzB,wBAAwB;IACxB,IAAI,OAAO,GAAG,IAAI,QAAQ,CAAC,EAAC,KAAK,EAAE,GAAG,EAAC,CAAC,CAAA;IAExC,oDAAoD;IACpD,6DAA6D;IAC7D,0EAA0E;IAC1E,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAA;IAErB,yDAAyD;IACzD,gBAAgB;IAChB,OAAO,CAAC,GAAG,CAAC,mEAAmE,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAA;AACrG,CAAC"}
@@ -1 +0,0 @@
1
- export declare function main(): Promise<void>;
@@ -1,22 +0,0 @@
1
- // Generated file based on method_call_on_value_receiver.go
2
- // Updated when compliance tests are re-run, DO NOT EDIT!
3
- import * as goscript from "@goscript/builtin";
4
- class MyStruct {
5
- MyInt = 0;
6
- MyString = "";
7
- // GetMyString returns the MyString field.
8
- GetMyString() {
9
- const m = this;
10
- return m.MyString;
11
- }
12
- constructor(init) { if (init)
13
- Object.assign(this, init); }
14
- clone() { return Object.assign(Object.create(MyStruct.prototype), this); }
15
- // Register this type with the runtime type system
16
- static __typeInfo = goscript.registerType('MyStruct', goscript.TypeKind.Struct, new MyStruct(), new Set(['GetMyString']), MyStruct);
17
- }
18
- export async function main() {
19
- let ms = new MyStruct({ MyInt: 1, MyString: "bar" });
20
- console.log("Method call on value: Expected: bar, Actual:", ms.GetMyString());
21
- }
22
- //# sourceMappingURL=method_call_on_value_receiver.gs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"method_call_on_value_receiver.gs.js","sourceRoot":"","sources":["../../../../compliance/tests/method_call_on_value_receiver/method_call_on_value_receiver.gs.ts"],"names":[],"mappings":"AAAA,2DAA2D;AAC3D,yDAAyD;AAEzD,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAC;AAE9C,MAAM,QAAQ;IACN,KAAK,GAAW,CAAC,CAAC;IAClB,QAAQ,GAAW,EAAE,CAAC;IAE7B,0CAA0C;IACnC,WAAW;QACjB,MAAM,CAAC,GAAG,IAAI,CAAA;QACd,OAAO,CAAC,CAAC,QAAQ,CAAA;IAClB,CAAC;IAED,YAAY,IAAwB,IAAI,IAAI,IAAI;QAAE,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAW,CAAC,CAAC,CAAC,CAAC;IAC9E,KAAK,KAAe,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAa,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;IAEvG,kDAAkD;IAClD,MAAM,CAAC,UAAU,GAAG,QAAQ,CAAC,YAAY,CACvC,UAAU,EACV,QAAQ,CAAC,QAAQ,CAAC,MAAM,EACxB,IAAI,QAAQ,EAAE,EACd,IAAI,GAAG,CAAC,CAAC,aAAa,CAAC,CAAC,EACxB,QAAQ,CACT,CAAC;;AAGH,MAAM,CAAC,KAAK,UAAU,IAAI;IACzB,IAAI,EAAE,GAAG,IAAI,QAAQ,CAAC,EAAC,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAC,CAAC,CAAA;IAClD,OAAO,CAAC,GAAG,CAAC,8CAA8C,EAAE,EAAE,CAAC,WAAW,EAAE,CAAC,CAAA;AAC9E,CAAC"}
@@ -1 +0,0 @@
1
- export declare function main(): Promise<void>;
@@ -1,33 +0,0 @@
1
- // Generated file based on method_call_on_value_via_pointer.go
2
- // Updated when compliance tests are re-run, DO NOT EDIT!
3
- import * as goscript from "@goscript/builtin";
4
- class MyStruct {
5
- MyInt = 0;
6
- // GetValue returns the MyInt field (value receiver).
7
- GetValue() {
8
- const m = this;
9
- return m.MyInt;
10
- }
11
- constructor(init) { if (init)
12
- Object.assign(this, init); }
13
- clone() { return Object.assign(Object.create(MyStruct.prototype), this); }
14
- // Register this type with the runtime type system
15
- static __typeInfo = goscript.registerType('MyStruct', goscript.TypeKind.Struct, new MyStruct(), new Set(['GetValue']), MyStruct);
16
- }
17
- export async function main() {
18
- // Create a struct value
19
- let msValue = new MyStruct({ MyInt: 100 });
20
- // Create a pointer to the struct value
21
- let msPointer = msValue;
22
- // === Method Call on Value Receiver via Pointer ===
23
- // Call the value-receiver method using the pointer variable.
24
- // Go implicitly dereferences msPointer to call GetValue on the value.
25
- // Expected: 100
26
- console.log("Value via pointer call: Expected: 100, Actual:", msPointer.GetValue());
27
- // Modify the value through the original value variable
28
- msValue.MyInt = 200;
29
- // The pointer still points to the modified value
30
- // Expected: 200
31
- console.log("Value via pointer call after modification: Expected: 200, Actual:", msPointer.GetValue());
32
- }
33
- //# sourceMappingURL=method_call_on_value_via_pointer.gs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"method_call_on_value_via_pointer.gs.js","sourceRoot":"","sources":["../../../../compliance/tests/method_call_on_value_via_pointer/method_call_on_value_via_pointer.gs.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,yDAAyD;AAEzD,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAC;AAE9C,MAAM,QAAQ;IACN,KAAK,GAAW,CAAC,CAAC;IAEzB,qDAAqD;IAC9C,QAAQ;QACd,MAAM,CAAC,GAAG,IAAI,CAAA;QACd,OAAO,CAAC,CAAC,KAAK,CAAA;IACf,CAAC;IAED,YAAY,IAAwB,IAAI,IAAI,IAAI;QAAE,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAW,CAAC,CAAC,CAAC,CAAC;IAC9E,KAAK,KAAe,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAa,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;IAEvG,kDAAkD;IAClD,MAAM,CAAC,UAAU,GAAG,QAAQ,CAAC,YAAY,CACvC,UAAU,EACV,QAAQ,CAAC,QAAQ,CAAC,MAAM,EACxB,IAAI,QAAQ,EAAE,EACd,IAAI,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,EACrB,QAAQ,CACT,CAAC;;AAGH,MAAM,CAAC,KAAK,UAAU,IAAI;IACzB,wBAAwB;IACxB,IAAI,OAAO,GAAG,IAAI,QAAQ,CAAC,EAAC,KAAK,EAAE,GAAG,EAAC,CAAC,CAAA;IACxC,uCAAuC;IACvC,IAAI,SAAS,GAAG,OAAO,CAAA;IAEvB,oDAAoD;IACpD,6DAA6D;IAC7D,sEAAsE;IACtE,gBAAgB;IAChB,OAAO,CAAC,GAAG,CAAC,gDAAgD,EAAE,SAAS,CAAC,QAAQ,EAAE,CAAC,CAAA;IAEnF,uDAAuD;IACvD,OAAO,CAAC,KAAK,GAAG,GAAG,CAAA;IAEnB,iDAAiD;IACjD,gBAAgB;IAChB,OAAO,CAAC,GAAG,CAAC,mEAAmE,EAAE,SAAS,CAAC,QAAQ,EAAE,CAAC,CAAA;AACvG,CAAC"}
@@ -1 +0,0 @@
1
- export declare function main(): Promise<void>;
@@ -1,17 +0,0 @@
1
- // Generated file based on multiple_return_values.go
2
- // Updated when compliance tests are re-run, DO NOT EDIT!
3
- function multipleReturnValues() {
4
- return [42, "hello", true];
5
- }
6
- export async function main() {
7
- let [a, b, c] = multipleReturnValues();
8
- console.log(a);
9
- console.log(b);
10
- console.log(c);
11
- let [x, , z] = multipleReturnValues();
12
- console.log(x);
13
- console.log(z);
14
- let [, y,] = multipleReturnValues();
15
- console.log(y);
16
- }
17
- //# sourceMappingURL=multiple_return_values.gs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"multiple_return_values.gs.js","sourceRoot":"","sources":["../../../../compliance/tests/multiple_return_values/multiple_return_values.gs.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,yDAAyD;AAIzD,SAAS,oBAAoB;IAC5B,OAAO,CAAC,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,CAAA;AAC3B,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,IAAI;IACzB,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,GAAG,oBAAoB,EAAE,CAAA;IACtC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;IACd,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;IACd,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;IAEd,IAAI,CAAC,CAAC,EAAE,AAAD,EAAG,CAAC,CAAC,GAAG,oBAAoB,EAAE,CAAA;IACrC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;IACd,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;IAEd,IAAI,CAAC,EAAE,CAAC,EAAG,GAAG,oBAAoB,EAAE,CAAA;IACpC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;AACf,CAAC"}
@@ -1 +0,0 @@
1
- export declare function main(): Promise<void>;
@@ -1,29 +0,0 @@
1
- // Generated file based on pointer_assignment_no_copy.go
2
- // Updated when compliance tests are re-run, DO NOT EDIT!
3
- import * as goscript from "@goscript/builtin";
4
- class MyStruct {
5
- MyInt = 0;
6
- MyString = "";
7
- constructor(init) { if (init)
8
- Object.assign(this, init); }
9
- clone() { return Object.assign(Object.create(MyStruct.prototype), this); }
10
- // Register this type with the runtime type system
11
- static __typeInfo = goscript.registerType('MyStruct', goscript.TypeKind.Struct, new MyStruct(), new Set([]), MyStruct);
12
- }
13
- export async function main() {
14
- let original = new MyStruct({ MyInt: 10, MyString: "original" });
15
- // === Pointer Assignment (No Copy) ===
16
- // Assigning a pointer variable to another pointer variable.
17
- let pointerCopy = original;
18
- // Modify the struct through the original pointer.
19
- original.MyString = "modified original";
20
- // The change should be reflected when accessing through the copied pointer.
21
- // Expected: "modified original"
22
- console.log("Pointer copy value: Expected: modified original, Actual: " + pointerCopy.MyString);
23
- // Modify the struct through the copied pointer.
24
- pointerCopy.MyInt = 20;
25
- // The change should be reflected when accessing through the original pointer.
26
- // Expected: 20
27
- console.log("Original value after pointer copy modification: Expected: 20, Actual:", original.MyInt);
28
- }
29
- //# sourceMappingURL=pointer_assignment_no_copy.gs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pointer_assignment_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AC,CAAA;AACrG,CAAC"}
@@ -1 +0,0 @@
1
- export declare function main(): Promise<void>;
@@ -1,27 +0,0 @@
1
- // Generated file based on pointer_composite_literal_assignment.go
2
- // Updated when compliance tests are re-run, DO NOT EDIT!
3
- import * as goscript from "@goscript/builtin";
4
- class MyStruct {
5
- MyInt = 0;
6
- MyString = "";
7
- constructor(init) { if (init)
8
- Object.assign(this, init); }
9
- clone() { return Object.assign(Object.create(MyStruct.prototype), this); }
10
- // Register this type with the runtime type system
11
- static __typeInfo = goscript.registerType('MyStruct', goscript.TypeKind.Struct, new MyStruct(), new Set([]), MyStruct);
12
- }
13
- export async function main() {
14
- // === Pointer Composite Literal Assignment ===
15
- // Creating a pointer to a struct directly using a composite literal with &
16
- let structPointer = new MyStruct({ MyInt: 42, MyString: "composite literal pointer" });
17
- // Access fields through the pointer
18
- // Expected: 42
19
- console.log("MyInt via pointer: Expected: 42, Actual:", structPointer.MyInt);
20
- // Expected: "composite literal pointer"
21
- console.log("MyString via pointer: Expected: composite literal pointer, Actual: " + structPointer.MyString);
22
- // Modify through the pointer
23
- structPointer.MyInt = 99;
24
- // Expected: 99
25
- console.log("MyInt after modification: Expected: 99, Actual:", structPointer.MyInt);
26
- }
27
- //# sourceMappingURL=pointer_composite_literal_assignment.gs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pointer_composite_literal_assignment.gs.js","sourceRoot":"","sources":["../../../../compliance/tests/pointer_composite_literal_assignment/pointer_composite_literal_assignment.gs.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,yDAAyD;AAEzD,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAC;AAE9C,MAAM,QAAQ;IACN,KAAK,GAAW,CAAC,CAAC;IAClB,QAAQ,GAAW,EAAE,CAAC;IAE7B,YAAY,IAAwB,IAAI,IAAI,IAAI;QAAE,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAW,CAAC,CAAC,CAAC,CAAC;IAC9E,KAAK,KAAe,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAa,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;IAEvG,kDAAkD;IAClD,MAAM,CAAC,UAAU,GAAG,QAAQ,CAAC,YAAY,CACvC,UAAU,EACV,QAAQ,CAAC,QAAQ,CAAC,MAAM,EACxB,IAAI,QAAQ,EAAE,EACd,IAAI,GAAG,CAAC,EAAE,CAAC,EACX,QAAQ,CACT,CAAC;;AAGH,MAAM,CAAC,KAAK,UAAU,IAAI;IACzB,+CAA+C;IAC/C,2EAA2E;IAC3E,IAAI,aAAa,GAAG,IAAI,QAAQ,CAAC,EAAC,KAAK,EAAE,EAAE,EAAE,QAAQ,EAAE,2BAA2B,EAAC,CAAC,CAAA;IAEpF,oCAAoC;IACpC,eAAe;IACf,OAAO,CAAC,GAAG,CAAC,0CAA0C,EAAE,aAAa,CAAC,KAAK,CAAC,CAAA;IAC5E,wCAAwC;IACxC,OAAO,CAAC,GAAG,CAAC,qEAAqE,GAAG,aAAa,CAAC,QAAQ,CAAC,CAAA;IAE3G,6BAA6B;IAC7B,aAAa,CAAC,KAAK,GAAG,EAAE,CAAA;IACxB,eAAe;IACf,OAAO,CAAC,GAAG,CAAC,iDAAiD,EAAE,aAAa,CAAC,KAAK,CAAC,CAAA;AACpF,CAAC"}
@@ -1 +0,0 @@
1
- export declare function main(): Promise<void>;
@@ -1,22 +0,0 @@
1
- // Generated file based on pointer_deref_multiassign.go
2
- // Updated when compliance tests are re-run, DO NOT EDIT!
3
- import * as goscript from "@goscript/builtin";
4
- class MyStruct {
5
- MyInt = 0;
6
- MyString = "";
7
- myBool = false;
8
- constructor(init) { if (init)
9
- Object.assign(this, init); }
10
- clone() { return Object.assign(Object.create(MyStruct.prototype), this); }
11
- // Register this type with the runtime type system
12
- static __typeInfo = goscript.registerType('MyStruct', goscript.TypeKind.Struct, new MyStruct(), new Set([]), MyStruct);
13
- }
14
- export async function main() {
15
- let structPointer = new MyStruct({ MyInt: 4, MyString: "hello world" });
16
- // === Pointer Dereference and Multi-Assignment ===
17
- // Dereference structPointer to get a copy of the struct.
18
- // Also demonstrates multi-variable assignment and the use of the blank identifier '_'.
19
- let dereferencedStructCopy = structPointer.clone();
20
- let unusedString = "hello"; // testing _ set
21
- }
22
- //# sourceMappingURL=pointer_deref_multiassign.gs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pointer_deref_multiassign.gs.js","sourceRoot":"","sources":["../../../../compliance/tests/pointer_deref_multiassign/pointer_deref_multiassign.gs.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,yDAAyD;AAEzD,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAC;AAE9C,MAAM,QAAQ;IACN,KAAK,GAAW,CAAC,CAAC;IAClB,QAAQ,GAAW,EAAE,CAAC;IACrB,MAAM,GAAY,KAAK,CAAC;IAEhC,YAAY,IAAwB,IAAI,IAAI,IAAI;QAAE,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAW,CAAC,CAAC,CAAC,CAAC;IAC9E,KAAK,KAAe,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAa,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;IAEvG,kDAAkD;IAClD,MAAM,CAAC,UAAU,GAAG,QAAQ,CAAC,YAAY,CACvC,UAAU,EACV,QAAQ,CAAC,QAAQ,CAAC,MAAM,EACxB,IAAI,QAAQ,EAAE,EACd,IAAI,GAAG,CAAC,EAAE,CAAC,EACX,QAAQ,CACT,CAAC;;AAGH,MAAM,CAAC,KAAK,UAAU,IAAI;IACzB,IAAI,aAAa,GAAG,IAAI,QAAQ,CAAC,EAAC,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,aAAa,EAAC,CAAC,CAAA;IACrE,mDAAmD;IACnD,yDAAyD;IACzD,uFAAuF;IACvF,IAAI,sBAAsB,GAAG,aAAa,CAAC,KAAK,EAAE,CAAA;IAClD,IAAI,YAAY,GAAG,OAAO,CAAA,CAAC,gBAAgB;AAC5C,CAAC"}
@@ -1 +0,0 @@
1
- export declare function main(): Promise<void>;
@@ -1,20 +0,0 @@
1
- // Generated file based on pointer_initialization.go
2
- // Updated when compliance tests are re-run, DO NOT EDIT!
3
- import * as goscript from "@goscript/builtin";
4
- class MyStruct {
5
- MyInt = 0;
6
- MyString = "";
7
- constructor(init) { if (init)
8
- Object.assign(this, init); }
9
- clone() { return Object.assign(Object.create(MyStruct.prototype), this); }
10
- // Register this type with the runtime type system
11
- static __typeInfo = goscript.registerType('MyStruct', goscript.TypeKind.Struct, new MyStruct(), new Set([]), MyStruct);
12
- }
13
- export async function main() {
14
- // === Pointer Initialization ===
15
- // Create a pointer to a MyStruct instance using a composite literal.
16
- let structPointer = new MyStruct({ MyInt: 4, MyString: "hello world" });
17
- // Expected: "hello world"
18
- console.log("Initial MyString (via pointer): Expected: hello world, Actual: " + structPointer.MyString);
19
- }
20
- //# sourceMappingURL=pointer_initialization.gs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pointer_initialization.gs.js","sourceRoot":"","sources":["../../../../compliance/tests/pointer_initialization/pointer_initialization.gs.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,yDAAyD;AAEzD,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAC;AAE9C,MAAM,QAAQ;IACN,KAAK,GAAW,CAAC,CAAC;IAClB,QAAQ,GAAW,EAAE,CAAC;IAE7B,YAAY,IAAwB,IAAI,IAAI,IAAI;QAAE,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAW,CAAC,CAAC,CAAC,CAAC;IAC9E,KAAK,KAAe,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAa,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;IAEvG,kDAAkD;IAClD,MAAM,CAAC,UAAU,GAAG,QAAQ,CAAC,YAAY,CACvC,UAAU,EACV,QAAQ,CAAC,QAAQ,CAAC,MAAM,EACxB,IAAI,QAAQ,EAAE,EACd,IAAI,GAAG,CAAC,EAAE,CAAC,EACX,QAAQ,CACT,CAAC;;AAGH,MAAM,CAAC,KAAK,UAAU,IAAI;IACzB,iCAAiC;IACjC,qEAAqE;IACrE,IAAI,aAAa,GAAG,IAAI,QAAQ,CAAC,EAAC,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,aAAa,EAAC,CAAC,CAAA;IACrE,0BAA0B;IAC1B,OAAO,CAAC,GAAG,CAAC,iEAAiE,GAAG,aAAa,CAAC,QAAQ,CAAC,CAAA;AACxG,CAAC"}
@@ -1,28 +0,0 @@
1
- // Generated file based on select_receive_on_closed_channel_no_default.go
2
- // Updated when compliance tests are re-run, DO NOT EDIT!
3
- import * as goscript from "@goscript/builtin";
4
- export async function main() {
5
- let ch = goscript.makeChannel(0, 0); // Unbuffered
6
- ch.close();
7
- //nolint:staticcheck
8
- // Should not be reached
9
- // Should be reached
10
- await goscript.selectStatement([
11
- {
12
- id: 0,
13
- isSend: false,
14
- channel: ch,
15
- onSelected: async (result) => {
16
- const val = result.value;
17
- const ok = result.ok;
18
- if (ok) {
19
- console.log("Received value with ok==true:", val); // Should not be reached
20
- }
21
- else {
22
- console.log("Received zero value with ok==false:", val); // Should be reached
23
- }
24
- }
25
- },
26
- ], false);
27
- }
28
- //# sourceMappingURL=select_receive_on_closed_channel_no_default.gs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"select_receive_on_closed_channel_no_default.gs.js","sourceRoot":"","sources":["../../../../compliance/tests/select_receive_on_closed_channel_no_default/select_receive_on_closed_channel_no_default.gs.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,yDAAyD;AAEzD,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAC;AAE9C,MAAM,CAAC,KAAK,UAAU,IAAI;IACzB,IAAI,EAAE,GAAG,QAAQ,CAAC,WAAW,CAAS,CAAC,EAAE,CAAC,CAAC,CAAA,CAAC,aAAa;IACzD,EAAE,CAAC,KAAK,EAAE,CAAA;IAEV,oBAAoB;IAEpB,wBAAwB;IAExB,oBAAoB;IACpB,MAAM,QAAQ,CAAC,eAAe,CAAC;QAC9B;YACC,EAAE,EAAE,CAAC;YACL,MAAM,EAAE,KAAK;YACb,OAAO,EAAE,EAAE;YACX,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;gBAC5B,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,CAAA;gBACxB,MAAM,EAAE,GAAG,MAAM,CAAC,EAAE,CAAA;gBACpB,IAAI,EAAE,EAAE,CAAC;oBACR,OAAO,CAAC,GAAG,CAAC,+BAA+B,EAAE,GAAG,CAAC,CAAA,CAAC,wBAAwB;gBAC3E,CAAC;qBAAM,CAAC;oBACP,OAAO,CAAC,GAAG,CAAC,qCAAqC,EAAE,GAAG,CAAC,CAAA,CAAC,oBAAoB;gBAC7E,CAAC;YACF,CAAC;SACD;KACD,EAAE,KAAK,CAAC,CAAA;AACV,CAAC"}
@@ -1,30 +0,0 @@
1
- // Generated file based on select_send_on_full_buffered_channel_with_default.go
2
- // Updated when compliance tests are re-run, DO NOT EDIT!
3
- import * as goscript from "@goscript/builtin";
4
- export async function main() {
5
- let ch = goscript.makeChannel(1, 0);
6
- await ch.send(1);
7
- // TODO: The comments on the following cases are written twice in the output.
8
- // Should not be reached
9
- // Should be reached
10
- await goscript.selectStatement([
11
- {
12
- id: 0,
13
- isSend: true,
14
- channel: ch,
15
- value: 2,
16
- onSelected: async (result) => {
17
- console.log("Sent value");
18
- }
19
- },
20
- {
21
- id: -1,
22
- isSend: false,
23
- channel: null,
24
- onSelected: async (result) => {
25
- console.log("Default case hit");
26
- }
27
- },
28
- ], true);
29
- }
30
- //# sourceMappingURL=select_send_on_full_buffered_channel_with_default.gs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"select_send_on_full_buffered_channel_with_default.gs.js","sourceRoot":"","sources":["../../../../compliance/tests/select_send_on_full_buffered_channel_with_default/select_send_on_full_buffered_channel_with_default.gs.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,yDAAyD;AAEzD,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAC;AAE9C,MAAM,CAAC,KAAK,UAAU,IAAI;IACzB,IAAI,EAAE,GAAG,QAAQ,CAAC,WAAW,CAAS,CAAC,EAAE,CAAC,CAAC,CAAA;IAC3C,MAAM,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IAEhB,6EAA6E;IAE7E,wBAAwB;IAExB,oBAAoB;IACpB,MAAM,QAAQ,CAAC,eAAe,CAAC;QAC9B;YACC,EAAE,EAAE,CAAC;YACL,MAAM,EAAE,IAAI;YACZ,OAAO,EAAE,EAAE;YACX,KAAK,EAAE,CAAC;YACR,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;gBAC5B,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAA;YAC1B,CAAC;SACD;QACD;YACC,EAAE,EAAE,CAAC,CAAC;YACN,MAAM,EAAE,KAAK;YACb,OAAO,EAAE,IAAI;YACb,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;gBAC5B,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAA;YAChC,CAAC;SACD;KACD,EAAE,IAAI,CAAC,CAAA;AACT,CAAC"}
@@ -1 +0,0 @@
1
- export declare function main(): Promise<void>;