6.3.2 Compatibility of structured types

Add test
6.3.2 Compatibility of structured types
 

6.3.2.1 Compatibility of enumerated types

Add test
6.3.2.1 Compatibility of enumerated types
 

Enumerated types are only compatible to synonym types (see clause 6.4) and not compatible with other basic or structured types.

Add test
Test:Hits:
file:///D:/documents/ttcn3-workspace_copy/ATS/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_001.ttcn1
file:///D:/documents/ttcn3-workspace_copy/ATS/06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_001.ttcn1
file:///D:/documents/ttcn3-workspace_copy/ATS/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_009.ttcn1
Enumerated types are only compatible to synonym types (see clause 6.4) and not compatible with other basic or structured types.
 

6.3.2.2 Compatibility of record and record of types

Add test
6.3.2.2 Compatibility of record and record of types
 

Two array types are compatible if their corresponding record of types are compatible.

Add test
Test:Hits:
file:///D:/documents/ttcn3-workspace_copy/ATS/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_014.ttcn1
Two array types are compatible if their corresponding record of types are compatible.
 

Values of elements of the value "b" shall be assigned sequentially to the instance of type "A", including undefined elements.

Add test
Values of elements of the value "b" shall be assigned sequentially to the instance of type "A", including undefined elements.
 

record of types and arrays are compatible if

Add test
record of types and arrays are compatible if
 

their element types are compatible

Add test
Test:Hits:
file:///D:/documents/ttcn3-workspace_copy/ATS/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_015.ttcn1
file:///D:/documents/ttcn3-workspace_copy/ATS/06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_001.ttcn1
file:///D:/documents/ttcn3-workspace_copy/ATS/06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_002.ttcn1
their element types are compatible
 

value "b" does not violate any length subtyping of the record of type "A" or dimensions of the array type

Add test
Test:Hits:
file:///D:/documents/ttcn3-workspace_copy/ATS/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_013.ttcn1
file:///D:/documents/ttcn3-workspace_copy/ATS/06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_001.ttcn1
file:///D:/documents/ttcn3-workspace_copy/ATS/06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_002.ttcn1
file:///D:/documents/ttcn3-workspace_copy/ATS/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_006.ttcn1
value "b" does not violate any length subtyping of the record of type "A" or dimensions of the array type
 

record types are compatible if

Add test
record types are compatible if
 

the number, and optional aspect of the fields in the textual order of definition are identical

Add test
Test:Hits:
file:///D:/documents/ttcn3-workspace_copy/ATS/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_002.ttcn1
file:///D:/documents/ttcn3-workspace_copy/ATS/06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_001.ttcn1
the number, and optional aspect of the fields in the textual order of definition are identical
 

the types of each field are compatible

Add test
Test:Hits:
file:///D:/documents/ttcn3-workspace_copy/ATS/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_014.ttcn1
file:///D:/documents/ttcn3-workspace_copy/ATS/06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_001.ttcn1
file:///D:/documents/ttcn3-workspace_copy/ATS/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_003.ttcn1
the types of each field are compatible
 

the value of each existing field of the value "b" is compatible with the type of its corresponding field in type "A"

Add test
Test:Hits:
file:///D:/documents/ttcn3-workspace_copy/ATS/06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_001.ttcn1
file:///D:/documents/ttcn3-workspace_copy/ATS/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_012.ttcn1
the value of each existing field of the value "b" is compatible with the type of its corresponding field in type "A"
 

6.3.2.3 Compatibility of set and set of types

Add test
6.3.2.3 Compatibility of set and set of types
 

field names unambiguously identify, which fields of the related set type correspond to which set value fields.

Add test
Test:Hits:
file:///D:/documents/ttcn3-workspace_copy/ATS/06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_001.ttcn1
In set values the order of fields may be arbitrary, however this does not affect type compatibility as field names unambiguously identify, which fields of the related set type correspond to which set value fields.
 

set of types are only compatible with other set of types

Add test
set of types are only compatible with other set of types
 

for set of types the same compatibility rules shall apply as to record of types.

Add test
for set of types the same compatibility rules shall apply as to record of types.
 
their element types are compatible
Add test
Test:Hits:
file:///D:/documents/ttcn3-workspace_copy/ATS/06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_001.ttcn1
file:///D:/documents/ttcn3-workspace_copy/ATS/06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_002.ttcn1
 
value "b" does not violate any length subtyping of the record of type "A" or dimensions of the array type
Add test
Test:Hits:
file:///D:/documents/ttcn3-workspace_copy/ATS/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_013.ttcn1
file:///D:/documents/ttcn3-workspace_copy/ATS/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_007.ttcn1
file:///D:/documents/ttcn3-workspace_copy/ATS/06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_001.ttcn1
file:///D:/documents/ttcn3-workspace_copy/ATS/06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_002.ttcn1
 

set of types are only compatible with other set of types

Add test
Test:Hits:
file:///D:/documents/ttcn3-workspace_copy/ATS/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_017.ttcn1
file:///D:/documents/ttcn3-workspace_copy/ATS/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_016.ttcn1
file:///D:/documents/ttcn3-workspace_copy/ATS/06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_001.ttcn1
file:///D:/documents/ttcn3-workspace_copy/ATS/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_019.ttcn1
 

set types are only compatible with other set types

Add test
set types are only compatible with other set types
 

For set types the same compatibility rules shall apply as to record types

Add test
For set types the same compatibility rules shall apply as to record types
 
the number, and optional aspect of the fields in the textual order of definition are identical
Add test
Test:Hits:
file:///D:/documents/ttcn3-workspace_copy/ATS/06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_001.ttcn1
file:///D:/documents/ttcn3-workspace_copy/ATS/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_004.ttcn1
 
the types of each field are compatible
Add test
Test:Hits:
file:///D:/documents/ttcn3-workspace_copy/ATS/06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_001.ttcn1
 
the value of each existing field of the value "b" is compatible with the type of its corresponding field in type "A"
Add test
Test:Hits:
file:///D:/documents/ttcn3-workspace_copy/ATS/06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_001.ttcn1
file:///D:/documents/ttcn3-workspace_copy/ATS/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_012.ttcn1
file:///D:/documents/ttcn3-workspace_copy/ATS/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_005.ttcn1
 

set types are only compatible with other set types

Add test
Test:Hits:
file:///D:/documents/ttcn3-workspace_copy/ATS/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_018.ttcn1
 

the textual order of the fields in the type definition is decisive.

Add test
Test:Hits:
file:///D:/documents/ttcn3-workspace_copy/ATS/06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_001.ttcn1
This implies that though the order of elements at sending and receipt is unknown, when determining type compatibility for set types, the textual order of the fields in the type definition is decisive.
 

6.3.2.4 Compatibility of union types

Add test
6.3.2.4 Compatibility of union types
 

A union value "a" of union type "A" is compatible with union type "B" if

Add test
A union value "a" of union type "A" is compatible with union type "B" if
 

the alternative selected in "a" has a corresponding alternative with identical name in "B"

Add test
Test:Hits:
file:///D:/documents/ttcn3-workspace_copy/ATS/06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_001.ttcn1
file:///D:/documents/ttcn3-workspace_copy/ATS/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_008.ttcn1
file:///D:/documents/ttcn3-workspace_copy/ATS/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_010.ttcn1
file:///D:/documents/ttcn3-workspace_copy/ATS/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_009.ttcn1
the alternative selected in "a" has a corresponding alternative with identical name in "B"
 

the value of the selected alternative in "a" is compatible to the type of the corresponding alternative in "B".

Add test
Test:Hits:
file:///D:/documents/ttcn3-workspace_copy/ATS/06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_001.ttcn1
file:///D:/documents/ttcn3-workspace_copy/ATS/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_008.ttcn1
the value of the selected alternative in "a" is compatible to the type of the corresponding alternative in "B".
 

union types are only compatible with other union types

Add test
union types are only compatible with other union types
 

6.3.2.5 Compatibility of anytype types

Add test
6.3.2.5 Compatibility of anytype types
 

An anytype value "a" of anytype type "A" is compatible with anytype type "B" if

Add test
An anytype value "a" of anytype type "A" is compatible with anytype type "B" if
 

the alternative selected in "a" has a corresponding alternative with identical name in "B"

Add test
Test:Hits:
file:///D:/documents/ttcn3-workspace_copy/ATS/06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_004.ttcn1
the alternative selected in "a" has a corresponding alternative with identical name in "B"
 

the value of the selected alternative in "a" is compatible to the type of the corresponding alternative in "B"

Add test
Test:Hits:
file:///D:/documents/ttcn3-workspace_copy/ATS/06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_004.ttcn1
file:///D:/documents/ttcn3-workspace_copy/ATS/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_011.ttcn1
the value of the selected alternative in "a" is compatible to the type of the corresponding alternative in "B"
 

anytype types are only compatible with other anytype types

Add test
anytype types are only compatible with other anytype types
 

6.3.2.6 Compatibility between sub-structures

Add test
6.3.2.6 Compatibility between sub-structures
 

The rules defined in this clause for structured types compatibility are also valid for the sub-structure of such types.

Add test
Test:Hits:
file:///D:/documents/ttcn3-workspace_copy/ATS/06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_003.ttcn1
file:///D:/documents/ttcn3-workspace_copy/ATS/06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_006.ttcn1
file:///D:/documents/ttcn3-workspace_copy/ATS/06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_005.ttcn1
The rules defined in this clause for structured types compatibility are also valid for the sub-structure of such types.