[SCALA] wrong method call
final87 opened this issue · comments
Creating Scala code from an asn1 definition with fixed size array, like this:
IntermediateDownlinkPartReport ::= SEQUENCE {
packetPart SEQUENCE (SIZE (255)) OF INTEGER(0..255)
}
in the Def file the class of the array is generated with a constructor accepting one parameter:
case class IntermediateUplinkPart_packetPart (arr: Array[IntermediateUplinkPart_packetPart_elem])
{
require(arr.length == 255)
}
but then the object is created passing two parameters
var pVal: IntermediateUplinkPart_packetPart = IntermediateUplinkPart_packetPart(0, Array.fill(255){0})`
which causes compilation error.
Thank you for the bug report. We'll take a look at it.
Hi @final87
Thanks for letting us know :) This simple case was not covered by the PUS-C asn1 input.
We fixed this (and other stuff) in:
https://github.com/ateleris/asn1scc/tree/scala-backend
It is only a draft right now :) Please use this branch until our work is pulled into the main repo :)