Fix issue in misra 9 x (#3409)
This commit is contained in:
parent
ee4d90b4fa
commit
7199dde161
|
@ -318,8 +318,9 @@ class InitializerParser:
|
|||
if self.ed.parent != self.root:
|
||||
# Check if token is correct value type for self.root.children[?]
|
||||
child = self.root.getChildByValueElement(self.ed)
|
||||
if child.elementType != 'record' or self.token.valueType.type != 'record' or child.valueType.typeScope != self.token.valueType.typeScope:
|
||||
self.root.markStuctureViolation(self.token)
|
||||
if self.token.valueType:
|
||||
if child.elementType != 'record' or self.token.valueType.type != 'record' or child.valueType.typeScope != self.token.valueType.typeScope:
|
||||
self.root.markStuctureViolation(self.token)
|
||||
|
||||
self.ed.setInitialized(isDesignated)
|
||||
|
||||
|
|
Loading…
Reference in New Issue