Skip to content

Export fails to escape some names when using qualified name #1887

@adaussy

Description

@adaussy

In rare cases when the model contains name conflicts, the export provuce invalid model when the first namespace of a qualified name is not escaped whereas it should.

For example with in memory model:

package 'root && root' {
                	package 'AA & BB' {
                		item def ItemDef0;
                		requirement def RecDef1 {
                			requirementsSpecification : ItemDef0;
                		}
                		package 'JJ & GG' {
                			item requirements : ItemDef0;
                			item requirements : ItemDef0;
                		}
                	}
                	package 'CC & DD' {
                		private import 'AA & BB'::'JJ & GG'::*;
                		requirement rec0 : 'AA & BB'::RecDef1 {
                			requirementsSpecification :> 'AA & BB'::RecDef1::requirementsSpecification = 'root && root'::'AA & BB'::'JJ & GG'::requirements; // Here reference the second requirements  of 'JJ & GG'
                		}
                	}
                }

Then the export produce:

package 'root && root' {
                	package 'AA & BB' {
                		item def ItemDef0;
                		requirement def RecDef1 {
                			requirementsSpecification : ItemDef0;
                		}
                		package 'JJ & GG' {
                			item requirements : ItemDef0;
                			item requirements : ItemDef0;
                		}
                	}
                	package 'CC & DD' {
                		private import 'AA & BB'::'JJ & GG'::*;
                		requirement rec0 : 'AA & BB'::RecDef1 {
                			requirementsSpecification :> 'AA & BB'::RecDef1::requirementsSpecification = root && root::'AA & BB'::'JJ & GG'::requirements;
                		}
                	}
                }

In the feature value of "requirementSpecification", the first part "root && root" should be escaped.

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions