Skip to content

Commit 656bf98

Browse files
committed
Fix bug in ICD generation
This bug was introduced by merging PR #317. The issue caused the ICD tables for sequences, choices, and similar components to be empty when their child components were primitive types.
1 parent d9f556f commit 656bf98

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

BackendAst/DAstACN.fs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,13 @@ let private createAcnFunction (r: Asn1AcnAst.AstRoot)
291291
let sInitialExp = ""
292292
let func, funcDef, auxiliaries, icdResult, ns2 =
293293
match funcNameAndtasInfo with
294-
| None -> None, None, [], None, ns
294+
| None ->
295+
let content, ns1a = funcBody ns errCode [] (NestingScope.init t.acnMaxSizeInBits t.uperMaxSizeInBits []) p
296+
let icdResult =
297+
match content with
298+
| None -> None
299+
| Some bodyResult -> bodyResult.icdResult
300+
None, None, [], icdResult, ns1a
295301
| Some funcName ->
296302
let precondAnnots = lm.lg.generatePrecond r ACN t codec
297303
let postcondAnnots = lm.lg.generatePostcond r ACN funcNameBase p t codec

0 commit comments

Comments
 (0)