Skip to content

Wrong classifier instantiated for refined prototypes without binding #2839

@lwrage

Description

@lwrage

Summary
When a prototype that doesn't have an actual value supplied by a prototype binding is encountered during instantiation, OSATE uses the constraining classifier (if present) from the prototype declaration. However, if that classifier is provided in a refinement or substituted in a refinement, the instantiation does not use the refinement but only the original declaration.

Expected behavior
The classifier for instantiation should be taken from the refined prototype declaration.

Actual behavior
The classifier is taken from the original declaration

Steps To Reproduce

  1. Pate the model below into the OSATE editor and save
  2. Instantiate A.ix
  3. Open the instance file and notice that the data subcomponent is an instance of DT instead of `DT.i
package Issue2839
public
	
	data DT
	end DT;
	
	data implementation DT.i
	end DT.i;
	
	abstract A
	end A;
	
	abstract implementation A.i
		prototypes
			p: data DT;
		subcomponents
			d: data p;
	end A.i;
	
	abstract implementation A.ix extends A.i
		prototypes
			p: refined to data DT.i;
	end A.ix;
	
end Issue2839;

Desktop (please complete the following information):

  • OSATE Version: 2.11
  • Operating System: Linux

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions