Break the monolithic examples/50-smoke.sx into 30 focused per-section examples,
filed into their category blocks (basic/types/comptime/memory/protocols/ffi),
each carrying only the top-level decls its section references (the protocols
section keeps the full preamble — its deps flow through UFCS method calls that
name-based extraction can't see). Outputs verified identical to the original
section blocks.
Add examples/1036-errors-failable-smoke.sx — an end-to-end error-handling example
(the E5.4 work): named + inferred error sets consumed via destructure, try (in
helpers), catch (bare-expr / match-body / diverging / no-binding), or
value-terminator, onfail+defer interleave, and error.X value + {} tag
interpolation.
Remove examples/50-smoke.sx. Suite: 324 passed, 0 failed.
25 lines
624 B
Plaintext
25 lines
624 B
Plaintext
#import "modules/std.sx";
|
|
#import "modules/math/math.sx";
|
|
#import "modules/compiler.sx";
|
|
#import "modules/test.sx";
|
|
pkg :: #import "modules/testpkg";
|
|
|
|
main :: () {
|
|
|
|
// ========================================================
|
|
// 16. COMPOUND ASSIGNMENT TYPE CONVERSION
|
|
// ========================================================
|
|
print("=== 16. Compound Assign ===\n");
|
|
{
|
|
ca_a : f64 = 10.0;
|
|
ca_b : f32 = 3.0;
|
|
ca_a += ca_b;
|
|
print("f64+=f32: {}\n", ca_a);
|
|
|
|
ca_c : s64 = 100;
|
|
ca_d : s32 = 7;
|
|
ca_c -= ca_d;
|
|
print("s64-=s32: {}\n", ca_c);
|
|
}
|
|
}
|