@@ -297,7 +297,7 @@ end_block_insufficient_values_on_stack_2:
297
297
end_block_type_mismatch:
298
298
.functype end_block_type_mismatch () -> ()
299
299
block i32
300
- f32.const 1.0
300
+ f32.const 1.0
301
301
# CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [i32] but got [f32]
302
302
end_block
303
303
drop
@@ -314,7 +314,7 @@ end_loop_insufficient_values_on_stack:
314
314
end_loop_type_mismatch:
315
315
.functype end_loop_type_mismatch () -> ()
316
316
loop f32
317
- i32.const 1
317
+ i32.const 1
318
318
# CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [f32] but got [i32]
319
319
end_loop
320
320
drop
@@ -332,7 +332,7 @@ end_if_type_mismatch_1:
332
332
.functype end_if_type_mismatch_1 () -> ()
333
333
i32.const 1
334
334
if f32
335
- i32.const 1
335
+ i32.const 1
336
336
# CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [f32] but got [i32]
337
337
end_if
338
338
drop
@@ -342,7 +342,7 @@ end_if_insufficient_values_on_stack_2:
342
342
.functype end_if_insufficient_values_on_stack_2 () -> ()
343
343
i32.const 1
344
344
if i32
345
- i32.const 2
345
+ i32.const 2
346
346
else
347
347
# CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [i32] but got []
348
348
end_if
@@ -353,9 +353,9 @@ end_if_type_mismatch_2:
353
353
.functype end_if_type_mismatch_2 () -> ()
354
354
i32.const 1
355
355
if i32
356
- i32.const 2
356
+ i32.const 2
357
357
else
358
- f32.const 3.0
358
+ f32.const 3.0
359
359
# CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [i32] but got [f32]
360
360
end_if
361
361
drop
@@ -367,7 +367,7 @@ else_insufficient_values_on_stack:
367
367
if i32
368
368
# CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [i32] but got []
369
369
else
370
- i32.const 0
370
+ i32.const 0
371
371
end_if
372
372
drop
373
373
end_function
@@ -376,10 +376,10 @@ else_type_mismatch:
376
376
.functype else_type_mismatch () -> ()
377
377
i32.const 1
378
378
if i32
379
- f32.const 0 .0
379
+ f32.const 0 .0
380
380
# CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [i32] but got [f32]
381
381
else
382
- i32.const 0
382
+ i32.const 0
383
383
end_if
384
384
drop
385
385
end_function
@@ -390,7 +390,7 @@ else_type_mismatch:
390
390
end_try_insufficient_values_on_stack:
391
391
.functype end_try_insufficient_values_on_stack () -> ()
392
392
try i32
393
- i32.const 0
393
+ i32.const 0
394
394
catch_all
395
395
# CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [i32] but got []
396
396
end_try
@@ -400,7 +400,7 @@ end_try_insufficient_values_on_stack:
400
400
end_try_type_mismatch:
401
401
.functype end_try_type_mismatch () -> ()
402
402
try i32
403
- i32.const 0
403
+ i32.const 0
404
404
catch tag_f32
405
405
# CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [i32] but got [f32]
406
406
end_try
@@ -419,7 +419,7 @@ catch_insufficient_values_on_stack:
419
419
catch_type_mismatch:
420
420
.functype catch_type_mismatch () -> ()
421
421
try i32
422
- f32.const 1.0
422
+ f32.const 1.0
423
423
# CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [i32] but got [f32]
424
424
catch tag_i32
425
425
end_try
@@ -431,18 +431,18 @@ catch_all_insufficient_values_on_stack:
431
431
try i32
432
432
# CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [i32] but got []
433
433
catch_all
434
- i32.const 0
434
+ i32.const 0
435
435
end_try
436
436
drop
437
437
end_function
438
438
439
439
catch_all_type_mismatch:
440
440
.functype catch_all_type_mismatch () -> ()
441
441
try i32
442
- f32.const 1.0
442
+ f32.const 1.0
443
443
# CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [i32] but got [f32]
444
444
catch_all
445
- i32.const 0
445
+ i32.const 0
446
446
end_try
447
447
drop
448
448
end_function
@@ -458,7 +458,7 @@ delegate_insufficient_values_on_stack:
458
458
delegate_type_mismatch:
459
459
.functype delegate_type_mismatch () -> ()
460
460
try i32
461
- f32.const 1.0
461
+ f32.const 1.0
462
462
# CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [i32] but got [f32]
463
463
delegate 0
464
464
drop
@@ -679,7 +679,7 @@ other_insn_test_3:
679
679
check_after_unreachable_within_block:
680
680
.functype check_after_unreachable_within_block () -> ()
681
681
block
682
- unreachable
682
+ unreachable
683
683
end_block
684
684
# CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [any] but got []
685
685
drop
@@ -689,7 +689,7 @@ check_after_unreachable_within_block:
689
689
check_after_unreachable_within_loop:
690
690
.functype check_after_unreachable_within_loop () -> ()
691
691
loop
692
- unreachable
692
+ unreachable
693
693
end_loop
694
694
# CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [any] but got []
695
695
drop
@@ -700,9 +700,9 @@ check_after_unreachable_within_if_1:
700
700
.functype check_after_unreachable_within_if_1 () -> ()
701
701
i32.const 0
702
702
if
703
- unreachable
703
+ unreachable
704
704
else
705
- unreachable
705
+ unreachable
706
706
end_if
707
707
# CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [any] but got []
708
708
drop
@@ -713,20 +713,20 @@ check_after_unreachable_within_if_2:
713
713
.functype check_after_unreachable_within_if_2 () -> ()
714
714
i32.const 0
715
715
if
716
- unreachable
716
+ unreachable
717
717
else
718
- # CHECK: :[[@LINE+1]]:3 : error: type mismatch, expected [any] but got []
719
- drop
718
+ # CHECK: :[[@LINE+1]]:5 : error: type mismatch, expected [any] but got []
719
+ drop
720
720
end_if
721
721
end_function
722
722
723
723
# Unreachable code within 'try' does not affect type checking after 'end_try'
724
724
check_after_unreachable_within_try_1:
725
725
.functype check_after_unreachable_within_try_1 () -> ()
726
726
try
727
- unreachable
727
+ unreachable
728
728
catch_all
729
- unreachable
729
+ unreachable
730
730
end_try
731
731
# CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [any] but got []
732
732
drop
@@ -736,30 +736,30 @@ check_after_unreachable_within_try_1:
736
736
check_after_unreachable_within_try_2:
737
737
.functype check_after_unreachable_within_try_2 () -> ()
738
738
try
739
- unreachable
739
+ unreachable
740
740
catch tag_i32
741
- drop
742
- # CHECK: :[[@LINE+1]]:3 : error: type mismatch, expected [any] but got []
743
- drop
741
+ drop
742
+ # CHECK: :[[@LINE+1]]:5 : error: type mismatch, expected [any] but got []
743
+ drop
744
744
end_try
745
745
end_function
746
746
747
747
# Unreachable code within 'try' does not affect type checking after 'catch_all'
748
748
check_after_unreachable_within_try_3:
749
749
.functype check_after_unreachable_within_try_3 () -> ()
750
750
try
751
- unreachable
751
+ unreachable
752
752
catch_all
753
- # CHECK: :[[@LINE+1]]:3 : error: type mismatch, expected [any] but got []
754
- drop
753
+ # CHECK: :[[@LINE+1]]:5 : error: type mismatch, expected [any] but got []
754
+ drop
755
755
end_try
756
756
end_function
757
757
758
758
# Unreachable code within 'try' does not affect type checking after 'delegate'
759
759
check_after_unreachable_within_try_4:
760
760
.functype check_after_unreachable_within_try_4 () -> ()
761
761
try
762
- unreachable
762
+ unreachable
763
763
delegate 0
764
764
# CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [any] but got []
765
765
drop
@@ -838,12 +838,12 @@ br_invalid_type_catch_all:
838
838
br_invalid_depth_out_of_range:
839
839
.functype br_invalid_depth_out_of_range () -> ()
840
840
block
841
- block
842
- block
843
- # CHECK: :[[@LINE+1]]:5 : error: br: invalid depth 4
844
- br 4
845
- end_block
846
- end_block
841
+ block
842
+ block
843
+ # CHECK: :[[@LINE+1]]:9 : error: br: invalid depth 4
844
+ br 4
845
+ end_block
846
+ end_block
847
847
end_block
848
848
end_function
849
849
@@ -936,9 +936,9 @@ block_param_and_return:
936
936
drop
937
937
938
938
block f32
939
- f32.const 0 .0
940
- br 0
941
- i32.const 0
939
+ f32.const 0 .0
940
+ br 0
941
+ i32.const 0
942
942
# CHECK: :[[@LINE+1]]:3: error: type mismatch, expected [f32] but got [..., i32]
943
943
end_block
944
944
0 commit comments