File tree 3 files changed +14
-18
lines changed
sway-core/src/language/ty/declaration
test/src/e2e_vm_tests/test_programs/should_pass/language/const_generics
3 files changed +14
-18
lines changed Original file line number Diff line number Diff line change @@ -713,7 +713,7 @@ impl DebugWithEngines for TyFunctionSig {
713
713
self . type_parameters
714
714
. iter( )
715
715
. map( |p| match p {
716
- TyFunctionSigTypeParameter :: Type ( t) => format!( "{}" , engines. help_out( t) ) ,
716
+ TyFunctionSigTypeParameter :: Type ( t) => format!( "{:? }" , engines. help_out( t) ) ,
717
717
TyFunctionSigTypeParameter :: Const ( expr) =>
718
718
format!( "{:?}" , engines. help_out( expr) ) ,
719
719
} )
Original file line number Diff line number Diff line change 8
8
"concreteTypeId" : " 4936d108619f9cd75cdeea2f3fe11241b06d22b856d4b61fa3ae412370b10a6a" ,
9
9
"metadataTypeId" : 0 ,
10
10
"type" : " [u64; 2]"
11
- },
12
- {
13
- "concreteTypeId" : " 1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" ,
14
- "type" : " u64"
15
11
}
16
12
],
17
13
"configurables" : [],
29
25
"output" : " 2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d"
30
26
}
31
27
],
32
- "loggedTypes" : [
33
- {
34
- "concreteTypeId" : " 4936d108619f9cd75cdeea2f3fe11241b06d22b856d4b61fa3ae412370b10a6a" ,
35
- "logId" : " 5275633847438908631"
36
- },
37
- {
38
- "concreteTypeId" : " 1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" ,
39
- "logId" : " 1515152261580153489"
40
- }
41
- ],
28
+ "loggedTypes" : [],
42
29
"messagesTypes" : [],
43
30
"metadataTypes" : [
44
31
{
45
32
"components" : [
46
33
{
47
34
"name" : " __array_element" ,
48
- "typeId" : " 1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0 "
35
+ "typeId" : 1
49
36
}
50
37
],
51
38
"metadataTypeId" : 0 ,
52
39
"type" : " [_; 2]"
40
+ },
41
+ {
42
+ "metadataTypeId" : 1 ,
43
+ "type" : " u64"
53
44
}
54
45
],
55
46
"programType" : " script" ,
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ fn return_n<const NNN: u64>() -> u64 {
28
28
}
29
29
30
30
fn main (a : [u64 ; 2 ]) {
31
- __log (a );
31
+ let _ = __dbg (a );
32
32
33
33
let a = [C {}]. my_len ();
34
34
assert (a == 1 );
@@ -37,8 +37,13 @@ fn main(a: [u64; 2]) {
37
37
assert (b == 2 );
38
38
39
39
let s : S <u64 , 3 > = S { };
40
- __log (s . len_xxx ());
40
+ let _ = __dbg (s . len_xxx ());
41
41
42
42
let _ = __dbg (return_n :: <3 >());
43
43
let _ = __dbg (return_n :: <5 >());
44
44
}
45
+
46
+ #[test]
47
+ fn run_main () {
48
+ main ([1 , 2 ]);
49
+ }
You can’t perform that action at this time.
0 commit comments