1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
//! > Test types for array macro with method call
//! > test_runner_name
test_expr_semantics(expect_diagnostics: false)
//! > expr_code
array![10, 11, 12].span()
//! > expected_semantics
FunctionCall(
ExprFunctionCall {
function: core::array::ArrayToSpan::<core::felt252>::span,
args: [
Value(
Snapshot(
ExprSnapshot {
inner: Block(
ExprBlock {
statements: [
Let(
StatementLet {
pattern: Variable(
__array_builder_macro_result__,
),
expr: FunctionCall(
ExprFunctionCall {
function: core::array::ArrayImpl::<core::felt252>::new,
args: [],
coupon_arg: None,
ty: core::array::Array::<core::felt252>,
},
),
else_clause: None,
},
),
Expr(
StatementExpr {
expr: FunctionCall(
ExprFunctionCall {
function: core::array::ArrayImpl::<core::felt252>::append,
args: [
Reference(
LocalVarId(test::__array_builder_macro_result__),
),
Value(
Literal(
ExprNumericLiteral {
value: 10,
ty: core::felt252,
},
),
),
],
coupon_arg: None,
ty: (),
},
),
},
),
Expr(
StatementExpr {
expr: FunctionCall(
ExprFunctionCall {
function: core::array::ArrayImpl::<core::felt252>::append,
args: [
Reference(
LocalVarId(test::__array_builder_macro_result__),
),
Value(
Literal(
ExprNumericLiteral {
value: 11,
ty: core::felt252,
},
),
),
],
coupon_arg: None,
ty: (),
},
),
},
),
Expr(
StatementExpr {
expr: FunctionCall(
ExprFunctionCall {
function: core::array::ArrayImpl::<core::felt252>::append,
args: [
Reference(
LocalVarId(test::__array_builder_macro_result__),
),
Value(
Literal(
ExprNumericLiteral {
value: 12,
ty: core::felt252,
},
),
),
],
coupon_arg: None,
ty: (),
},
),
},
),
],
tail: Some(
Var(
LocalVarId(test::__array_builder_macro_result__),
),
),
ty: core::array::Array::<core::felt252>,
},
),
ty: @core::array::Array::<core::felt252>,
},
),
),
],
coupon_arg: None,
ty: core::array::Span::<core::felt252>,
},
)
//! > expected_diagnostics