Skip to content

Commit 18ffa53

Browse files
authored
fix(codegen): don't apply inline modifier several times for *$_init_child (#3281)
1 parent 36528ed commit 18ffa53

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

src/generator/writers/writeContract.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,6 @@ export function writeInit(
229229
ctx.flag("inline");
230230
}
231231
ctx.context("type:" + t.name + "$init");
232-
ctx.flag("inline");
233232
ctx.body(() => {
234233
ctx.append(";; Build init code cell");
235234
ctx.append();

src/test/pipeline/__snapshots__/compile-ast.spec.ts.snap

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

3-
exports[`compilation of ASTs should compile AST to BoC 1`] = `"b5ee9c72010102010045000114ff00f4a413f4bcf2c80b01006cd330d072d721d200d200fa4021103450556f04f86101f862ed44d0d2000195d4d4596c129b30f82ac87001ca006d30c9e25bdcf2c082"`;
3+
exports[`compilation of ASTs should compile AST to BoC 1`] = `"b5ee9c7201010301004b000114ff00f4a413f4bcf2c80b01015ed330d072d721d200d200fa4021103450556f04f86101f862ed44d0d2000195d4d4596c128e8330db3ce25bdcf2c082020014f82ac87001ca006d30c9"`;
44

55
exports[`compilation of ASTs should compile AST to BoC 2`] = `
66
""Asm.fif" include
77
PROGRAM{
88
DECLPROC recv_internal
9+
DECLPROC ?fun_ref_bd34c99d66d48f62
910
recv_internal PROC:<{
1011
DROP
1112
CTOS
@@ -33,19 +34,22 @@ PROGRAM{
3334
}> PUSHCONT
3435
<{
3536
DROP
36-
MYCODE
37-
NEWC
38-
ZERO
39-
SWAP
40-
1 STI
41-
NULL
42-
DROP
43-
ENDC
37+
?fun_ref_bd34c99d66d48f62 INLINECALLDICT
4438
}> PUSHCONT
4539
IFELSE
4640
DROP2
4741
IFRET
4842
130 THROW
4943
}>
44+
?fun_ref_bd34c99d66d48f62 PROCREF:<{
45+
MYCODE
46+
NEWC
47+
ZERO
48+
SWAP
49+
1 STI
50+
NULL
51+
DROP
52+
ENDC
53+
}>
5054
}END>c"
5155
`;

0 commit comments

Comments
 (0)