test: group examples into per-category folders
Move examples/*.sx and their expected/ snapshots into per-category subfolders (examples/<category>/...). Folder = leading filename token, with ffi-objc/ffi-jni kept whole; filenames are unchanged. The corpus runner and LSP sweep now discover each category's expected/ dir, while issues/ stays flat. Example 1058's repo-root-relative companion import is made file-relative. Path strings embedded in 164 snapshots were regenerated (path-only changes). Test-layout docs in CLAUDE.md updated.
This commit is contained in:
1
examples/basic/expected/0010-basic-basic.exit
Normal file
1
examples/basic/expected/0010-basic-basic.exit
Normal file
@@ -0,0 +1 @@
|
||||
42
|
||||
1
examples/basic/expected/0010-basic-basic.stderr
Normal file
1
examples/basic/expected/0010-basic-basic.stderr
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
1
examples/basic/expected/0010-basic-basic.stdout
Normal file
1
examples/basic/expected/0010-basic-basic.stdout
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
1
examples/basic/expected/0011-basic-stdout.exit
Normal file
1
examples/basic/expected/0011-basic-stdout.exit
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
1
examples/basic/expected/0011-basic-stdout.stderr
Normal file
1
examples/basic/expected/0011-basic-stdout.stderr
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
1
examples/basic/expected/0011-basic-stdout.stdout
Normal file
1
examples/basic/expected/0011-basic-stdout.stdout
Normal file
@@ -0,0 +1 @@
|
||||
Hello
|
||||
1
examples/basic/expected/0012-basic-shadow.exit
Normal file
1
examples/basic/expected/0012-basic-shadow.exit
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
1
examples/basic/expected/0012-basic-shadow.stderr
Normal file
1
examples/basic/expected/0012-basic-shadow.stderr
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
4
examples/basic/expected/0012-basic-shadow.stdout
Normal file
4
examples/basic/expected/0012-basic-shadow.stdout
Normal file
@@ -0,0 +1,4 @@
|
||||
scope opened
|
||||
scoped x: 6
|
||||
scope closed
|
||||
main x: 42
|
||||
1
examples/basic/expected/0013-basic-defer.exit
Normal file
1
examples/basic/expected/0013-basic-defer.exit
Normal file
@@ -0,0 +1 @@
|
||||
42
|
||||
1
examples/basic/expected/0013-basic-defer.stderr
Normal file
1
examples/basic/expected/0013-basic-defer.stderr
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
1
examples/basic/expected/0013-basic-defer.stdout
Normal file
1
examples/basic/expected/0013-basic-defer.stdout
Normal file
@@ -0,0 +1 @@
|
||||
still here
|
||||
1
examples/basic/expected/0014-basic-code.exit
Normal file
1
examples/basic/expected/0014-basic-code.exit
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
1
examples/basic/expected/0014-basic-code.stderr
Normal file
1
examples/basic/expected/0014-basic-code.stderr
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
1
examples/basic/expected/0014-basic-code.stdout
Normal file
1
examples/basic/expected/0014-basic-code.stdout
Normal file
@@ -0,0 +1 @@
|
||||
hello from the other side
|
||||
1
examples/basic/expected/0015-basic-demo.exit
Normal file
1
examples/basic/expected/0015-basic-demo.exit
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
1
examples/basic/expected/0015-basic-demo.stderr
Normal file
1
examples/basic/expected/0015-basic-demo.stderr
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
1
examples/basic/expected/0015-basic-demo.stdout
Normal file
1
examples/basic/expected/0015-basic-demo.stdout
Normal file
@@ -0,0 +1 @@
|
||||
[1.000000, 0.000000, -1.000000]
|
||||
1
examples/basic/expected/0016-basic-while.exit
Normal file
1
examples/basic/expected/0016-basic-while.exit
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
1
examples/basic/expected/0016-basic-while.stderr
Normal file
1
examples/basic/expected/0016-basic-while.stderr
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
4
examples/basic/expected/0016-basic-while.stdout
Normal file
4
examples/basic/expected/0016-basic-while.stdout
Normal file
@@ -0,0 +1,4 @@
|
||||
count: 5
|
||||
break at: 12
|
||||
sum of odd 1-9: 25
|
||||
sum 55
|
||||
1
examples/basic/expected/0017-basic-conditions.exit
Normal file
1
examples/basic/expected/0017-basic-conditions.exit
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
1
examples/basic/expected/0017-basic-conditions.stderr
Normal file
1
examples/basic/expected/0017-basic-conditions.stderr
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
1
examples/basic/expected/0017-basic-conditions.stdout
Normal file
1
examples/basic/expected/0017-basic-conditions.stdout
Normal file
@@ -0,0 +1 @@
|
||||
containedcontainedcontained
|
||||
1
examples/basic/expected/0018-basic-quicksort.exit
Normal file
1
examples/basic/expected/0018-basic-quicksort.exit
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
1
examples/basic/expected/0018-basic-quicksort.stderr
Normal file
1
examples/basic/expected/0018-basic-quicksort.stderr
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
1
examples/basic/expected/0018-basic-quicksort.stdout
Normal file
1
examples/basic/expected/0018-basic-quicksort.stdout
Normal file
@@ -0,0 +1 @@
|
||||
[1, 2, 2, 2, 3, 3, 4, 5, 5, 6, 6, 333]
|
||||
1
examples/basic/expected/0019-basic-dot-shorthand.exit
Normal file
1
examples/basic/expected/0019-basic-dot-shorthand.exit
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
1
examples/basic/expected/0019-basic-dot-shorthand.stderr
Normal file
1
examples/basic/expected/0019-basic-dot-shorthand.stderr
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
41
examples/basic/expected/0019-basic-dot-shorthand.stdout
Normal file
41
examples/basic/expected/0019-basic-dot-shorthand.stdout
Normal file
@@ -0,0 +1,41 @@
|
||||
--- tagged enum compat ---
|
||||
T1: 3.140000
|
||||
T2: 3
|
||||
T3: 5.000000 3.000000
|
||||
T4: 2.710000
|
||||
T5: 9.500000
|
||||
T6: 4.199999
|
||||
T7a: 1.000000
|
||||
T7b: 2.000000 3.000000
|
||||
T7c: 3
|
||||
T8a: 10
|
||||
T8b: 20
|
||||
T8c: 30
|
||||
T9: 42
|
||||
T10a: 1
|
||||
T10b: 1.000000
|
||||
T10c: 9.000000
|
||||
--- struct static shorthand ---
|
||||
S1: 3.000000 4.000000
|
||||
S2: 5.000000 6.000000
|
||||
S3: 7.000000 8.000000
|
||||
S4: 0.000000 0.000000
|
||||
S4: 1.000000 0.000000
|
||||
S5: 60
|
||||
S6: 8.000000 8.000000 8.000000 8.000000
|
||||
S6: 8.000000 16.000000 8.000000 16.000000
|
||||
S6: 0.000000 12.000000 0.000000 12.000000
|
||||
S7: 7
|
||||
S8: 3.000000 4.000000
|
||||
S8q: 1.000000 2.000000
|
||||
S9: 4.000000 6.000000
|
||||
S10: 4.000000 6.000000
|
||||
--- edge cases ---
|
||||
E1: 5.000000 1.000000 2.000000
|
||||
E2: 9 1.000000 2.000000
|
||||
E3: 1
|
||||
E4: 4.000000 6.000000
|
||||
E5: 42
|
||||
E6: 1
|
||||
E7: 20.000000 10.000000
|
||||
=== DONE ===
|
||||
@@ -0,0 +1 @@
|
||||
1
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
double: 14
|
||||
sum: 7
|
||||
answer: 42
|
||||
total: 30
|
||||
scaled: 90
|
||||
1
examples/basic/expected/0022-basic-for-range.exit
Normal file
1
examples/basic/expected/0022-basic-for-range.exit
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
1
examples/basic/expected/0022-basic-for-range.stderr
Normal file
1
examples/basic/expected/0022-basic-for-range.stderr
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
10
examples/basic/expected/0022-basic-for-range.stdout
Normal file
10
examples/basic/expected/0022-basic-for-range.stdout
Normal file
@@ -0,0 +1,10 @@
|
||||
i=0
|
||||
i=1
|
||||
i=2
|
||||
n=5
|
||||
j=2
|
||||
j=3
|
||||
j=4
|
||||
[0]=A
|
||||
[1]=B
|
||||
[2]=A
|
||||
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
101 102 103
|
||||
circle 2.000000
|
||||
none
|
||||
1
examples/basic/expected/0024-basic-for-list.exit
Normal file
1
examples/basic/expected/0024-basic-for-list.exit
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
1
examples/basic/expected/0024-basic-for-list.stderr
Normal file
1
examples/basic/expected/0024-basic-for-list.stderr
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
4
examples/basic/expected/0024-basic-for-list.stdout
Normal file
4
examples/basic/expected/0024-basic-for-list.stdout
Normal file
@@ -0,0 +1,4 @@
|
||||
sum 60
|
||||
sum2 360
|
||||
via ptr 360
|
||||
boxes 7
|
||||
1
examples/basic/expected/0025-basic-literals.exit
Normal file
1
examples/basic/expected/0025-basic-literals.exit
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
1
examples/basic/expected/0025-basic-literals.stderr
Normal file
1
examples/basic/expected/0025-basic-literals.stderr
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
18
examples/basic/expected/0025-basic-literals.stdout
Normal file
18
examples/basic/expected/0025-basic-literals.stdout
Normal file
@@ -0,0 +1,18 @@
|
||||
=== 1. Literals ===
|
||||
decimal: 42
|
||||
hex: 255
|
||||
binary: 10
|
||||
float: 3.140000
|
||||
f64: 2.718281
|
||||
true: true
|
||||
false: false
|
||||
escapes: hello world
|
||||
multiline: line1
|
||||
line2
|
||||
heredoc: raw heredoc
|
||||
|
||||
undef-then-set: 77
|
||||
enum-lit: .green
|
||||
null-ptr: null
|
||||
string-len: 5
|
||||
empty-string: 0
|
||||
1
examples/basic/expected/0026-basic-operators.exit
Normal file
1
examples/basic/expected/0026-basic-operators.exit
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
1
examples/basic/expected/0026-basic-operators.stderr
Normal file
1
examples/basic/expected/0026-basic-operators.stderr
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
60
examples/basic/expected/0026-basic-operators.stdout
Normal file
60
examples/basic/expected/0026-basic-operators.stdout
Normal file
@@ -0,0 +1,60 @@
|
||||
=== 2. Operators ===
|
||||
add: 7
|
||||
sub: 7
|
||||
mul: 42
|
||||
div: 5
|
||||
mod: 2
|
||||
neg: -5
|
||||
eq: true
|
||||
neq: true
|
||||
lt: true
|
||||
gt: true
|
||||
le: true
|
||||
ge: true
|
||||
chain: true
|
||||
chain-gt: true
|
||||
chain-mixed: true
|
||||
eq-chain: true
|
||||
eq-chain-f: false
|
||||
band: 15
|
||||
bor: 7
|
||||
bxor: 240
|
||||
bxor2: 5
|
||||
bnot: -1
|
||||
bnot2: -2
|
||||
shl: 16
|
||||
shr: 16
|
||||
shl2: 24
|
||||
shr2: 127
|
||||
band-var: 15
|
||||
bor-var: 7
|
||||
bxor-var: 240
|
||||
shl-var: 16
|
||||
shr-var: 15
|
||||
bnot-var: -16
|
||||
and-assign: 15
|
||||
or-assign: 255
|
||||
xor-assign: 240
|
||||
shl-assign: 256
|
||||
shr-assign: 16
|
||||
mod-var: 2
|
||||
and: true
|
||||
and-false: false
|
||||
or: true
|
||||
or-false: false
|
||||
short-and: false
|
||||
short-or: true
|
||||
ca+=: 15
|
||||
ca-=: 12
|
||||
ca*=: 24
|
||||
ca/=: 4
|
||||
prec1: 14
|
||||
prec2: 20
|
||||
xx-cast: 200
|
||||
widen-u8-i64: 200
|
||||
widen-i32-f64: 42.000000
|
||||
widen-f32-f64: 1.500000
|
||||
widen-u8-i16: 100
|
||||
xx-i64-i32: 12345
|
||||
xx-f64-f32: 1.500000
|
||||
xx-f64-i32: 7
|
||||
1
examples/basic/expected/0027-basic-control-flow.exit
Normal file
1
examples/basic/expected/0027-basic-control-flow.exit
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
1
examples/basic/expected/0027-basic-control-flow.stderr
Normal file
1
examples/basic/expected/0027-basic-control-flow.stderr
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
26
examples/basic/expected/0027-basic-control-flow.stdout
Normal file
26
examples/basic/expected/0027-basic-control-flow.stdout
Normal file
@@ -0,0 +1,26 @@
|
||||
=== 4. Control Flow ===
|
||||
ite: 1
|
||||
ite-both: 10 20
|
||||
if-block: yes
|
||||
if-no-else: after
|
||||
nested-if: deep
|
||||
if-else-if: second
|
||||
if-block-expr: 15
|
||||
while: 5
|
||||
while-false: skipped
|
||||
while-break: 7
|
||||
while-continue: 25
|
||||
while-sum: 55
|
||||
nested-while: 9
|
||||
nested-break: 2 2
|
||||
for: 10 20 30 40
|
||||
for-print: 10 20 30 40
|
||||
for-idx: 0 1 2 3
|
||||
for-2arg: 10@0 20@1 30@2 40@3
|
||||
for-break: 10 20
|
||||
for-continue: 10 30 40
|
||||
for-slice: 10 20 30
|
||||
for-slice-idx: 0:10 1:20 2:30
|
||||
for-nested: (0,0) (0,1) (1,0) (1,1)
|
||||
for-break-idx: 2
|
||||
multi: 1 2 3
|
||||
1
examples/basic/expected/0028-basic-functions.exit
Normal file
1
examples/basic/expected/0028-basic-functions.exit
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
1
examples/basic/expected/0028-basic-functions.stderr
Normal file
1
examples/basic/expected/0028-basic-functions.stderr
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
21
examples/basic/expected/0028-basic-functions.stdout
Normal file
21
examples/basic/expected/0028-basic-functions.stdout
Normal file
@@ -0,0 +1,21 @@
|
||||
=== 5. Functions ===
|
||||
const: 42
|
||||
typed-const: 3.140000
|
||||
default-init: 0
|
||||
implicit-ret: 42
|
||||
early-ret: 5
|
||||
early-ret2: 99
|
||||
void-return: ok
|
||||
generic-i32: 42
|
||||
generic-f32: 1.500000
|
||||
generic-bool: true
|
||||
generic-multi: 30
|
||||
lambda: 14
|
||||
lambda-ret: 5.000000
|
||||
local-fn: 7
|
||||
fn-nested: 26
|
||||
varargs: 15
|
||||
spread: 60
|
||||
fp: 7
|
||||
fp-reassign: 12
|
||||
fp-apply: 30
|
||||
1
examples/basic/expected/0029-basic-scoping.exit
Normal file
1
examples/basic/expected/0029-basic-scoping.exit
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
1
examples/basic/expected/0029-basic-scoping.stderr
Normal file
1
examples/basic/expected/0029-basic-scoping.stderr
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
23
examples/basic/expected/0029-basic-scoping.stdout
Normal file
23
examples/basic/expected/0029-basic-scoping.stdout
Normal file
@@ -0,0 +1,23 @@
|
||||
=== 6. Scoping ===
|
||||
inner: 200
|
||||
outer: 100
|
||||
shadow-type: 42
|
||||
shadow-type: 3.140000
|
||||
nest3: 3
|
||||
nest2: 2
|
||||
nest1: 1
|
||||
scope-isolate: 100
|
||||
scope-reuse: 1
|
||||
scope-reuse: 2
|
||||
scope-reuse: 1
|
||||
defer-a
|
||||
defer-b
|
||||
defer-c
|
||||
d4
|
||||
d3
|
||||
d2
|
||||
d1
|
||||
inner-defer
|
||||
outer-defer
|
||||
defer-in-if: body
|
||||
defer-in-if: deferred
|
||||
1
examples/basic/expected/0030-basic-builtins.exit
Normal file
1
examples/basic/expected/0030-basic-builtins.exit
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
1
examples/basic/expected/0030-basic-builtins.stderr
Normal file
1
examples/basic/expected/0030-basic-builtins.stderr
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
31
examples/basic/expected/0030-basic-builtins.stdout
Normal file
31
examples/basic/expected/0030-basic-builtins.stdout
Normal file
@@ -0,0 +1,31 @@
|
||||
=== 7. Builtins ===
|
||||
out-ok
|
||||
sqrt: 3.000000
|
||||
sqrt-f64: 4.000000
|
||||
sizeof-i32: 4
|
||||
sizeof-f64: 8
|
||||
sizeof-struct: 8
|
||||
alignof-u8: 1
|
||||
alignof-i32: 4
|
||||
alignof-i64: 8
|
||||
alignof-struct: 4
|
||||
typeof: int
|
||||
typeof-float: float
|
||||
typeof-string: string
|
||||
typeof-bool: bool
|
||||
typeof-struct: struct
|
||||
typeof-enum: enum
|
||||
typename: Point
|
||||
fieldcount: 2
|
||||
fieldcount-enum: 3
|
||||
fieldname0: x
|
||||
fieldname1: y
|
||||
fieldname-enum0: red
|
||||
fieldname-enum2: blue
|
||||
fieldval0: 11
|
||||
fieldval1: 22
|
||||
fieldidx: 1
|
||||
fieldidx-tagged: 0
|
||||
fieldidx-tagged2: 2
|
||||
cast: 3
|
||||
cast-int-f64: 42.000000
|
||||
1
examples/basic/expected/0031-basic-local-fn-return.exit
Normal file
1
examples/basic/expected/0031-basic-local-fn-return.exit
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
17917
examples/basic/expected/0031-basic-local-fn-return.ir
Normal file
17917
examples/basic/expected/0031-basic-local-fn-return.ir
Normal file
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
=== 19. Local Fn Return ===
|
||||
local-struct: 42 99
|
||||
local-enum: .circle(2.500000)
|
||||
1
examples/basic/expected/0032-basic-ufcs-return-type.exit
Normal file
1
examples/basic/expected/0032-basic-ufcs-return-type.exit
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
17594
examples/basic/expected/0032-basic-ufcs-return-type.ir
Normal file
17594
examples/basic/expected/0032-basic-ufcs-return-type.ir
Normal file
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
=== 20. UFCS Return Type ===
|
||||
direct: 7
|
||||
ufcs: 7
|
||||
1
examples/basic/expected/0033-basic-if-struct.exit
Normal file
1
examples/basic/expected/0033-basic-if-struct.exit
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
1
examples/basic/expected/0033-basic-if-struct.stderr
Normal file
1
examples/basic/expected/0033-basic-if-struct.stderr
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
3
examples/basic/expected/0033-basic-if-struct.stdout
Normal file
3
examples/basic/expected/0033-basic-if-struct.stdout
Normal file
@@ -0,0 +1,3 @@
|
||||
=== 22. If-Struct ===
|
||||
if-struct: 10 20
|
||||
else-struct: 30 40
|
||||
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
=== 24. String Comparison ===
|
||||
str-eq: true
|
||||
str-neq: true
|
||||
str-diff: false
|
||||
empty-eq: true
|
||||
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
=== 25. Array Loop Mutation ===
|
||||
loop-fill: 1 2 3 4
|
||||
compound: 13
|
||||
1
examples/basic/expected/0036-basic-ufcs-aliases.exit
Normal file
1
examples/basic/expected/0036-basic-ufcs-aliases.exit
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
1
examples/basic/expected/0036-basic-ufcs-aliases.stderr
Normal file
1
examples/basic/expected/0036-basic-ufcs-aliases.stderr
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
12
examples/basic/expected/0036-basic-ufcs-aliases.stdout
Normal file
12
examples/basic/expected/0036-basic-ufcs-aliases.stdout
Normal file
@@ -0,0 +1,12 @@
|
||||
=== UFCS Aliases ===
|
||||
42
|
||||
42
|
||||
42
|
||||
42
|
||||
42
|
||||
3
|
||||
3
|
||||
3
|
||||
2
|
||||
1
|
||||
99
|
||||
1
examples/basic/expected/0037-basic-trailing-commas.exit
Normal file
1
examples/basic/expected/0037-basic-trailing-commas.exit
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
=== Trailing Commas ===
|
||||
trailing commas ok
|
||||
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
const_one=1
|
||||
raised=0
|
||||
clamp_hi=10
|
||||
clamp_lo=7
|
||||
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
a=11 b=12 n=12
|
||||
after reset n=0
|
||||
1
examples/basic/expected/0040-basic-block-value.exit
Normal file
1
examples/basic/expected/0040-basic-block-value.exit
Normal file
@@ -0,0 +1 @@
|
||||
35
|
||||
1
examples/basic/expected/0040-basic-block-value.stderr
Normal file
1
examples/basic/expected/0040-basic-block-value.stderr
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
1
examples/basic/expected/0040-basic-block-value.stdout
Normal file
1
examples/basic/expected/0040-basic-block-value.stdout
Normal file
@@ -0,0 +1 @@
|
||||
block-value total: 35
|
||||
@@ -0,0 +1 @@
|
||||
1
|
||||
@@ -0,0 +1,5 @@
|
||||
error: function returns 'i32' but the last expression's value is discarded by this `;` — drop the `;` to return it (or use an explicit `return`)
|
||||
--> examples/basic/0041-basic-block-value-reject.sx:10:10
|
||||
|
|
||||
10 | n * 2;
|
||||
| ^
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
12
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user