Skip to content

dash (unchanged) assignment does not work with set/record of types and assignment notation

Summary

When assigning a value to a set of or record of data instance using assignment notation, the unchanged (-) special value cannot be used as TITAN gives an error message in return.

Steps and/or TTCN-3 code to reproduce

Create a module with the following content:

type record of bitstring MyRecordOfType;
testcase record_of_set_of_assignments() runs on ct_empty{
  var MyRecordOfType v_myVariable := {
    [0] := -,
    [1] := '101'B,
    [2] := -
  };
  if(not isbound(v_myVariable[0]) and v_myVariable[1]=='101'B and not isbound(v_myVariable[2])){setverdict(pass);}
}

Try to compile it.

What is the current bug behavior?

dash assignments yield an error.

What is the expected correct behavior?

Test case should pass.

Relevant logs and/or screenshots

(Paste any relevant logs - please use code blocks (```) to format console output, logs, and code, as it's very hard to read otherwise.)

Possible fixes

Titan version

8.1.0

Platform details (OS type and version)

Microsoft Windows 10 Enterprise 10.0.19042

/cc @aknappqwt