Skip to content
Snippets Groups Projects
Commit 60d83555 authored by balaskoa's avatar balaskoa
Browse files

Put declaration closest to its first usage


Signed-off-by: default avatarbalaskoa <jeno.balasko@ericsson.com>
parent e73c579b
No related branches found
No related tags found
No related merge requests found
......@@ -588,12 +588,11 @@ public abstract class TTCN3_Set_Seq_Choice_BaseType extends Type implements ITyp
if (compField == null) {
return null;
}
final IType compFieldType = compField.getType().getTypeRefdLast(CompilationTimeStamp.getBaseTimestamp());
if (subreferences.get(localIndex) == lastSubreference) {
return Declaration.createInstance(getDefiningAssignment(), compField.getIdentifier());
}
final IType compFieldType = compField.getType().getTypeRefdLast(CompilationTimeStamp.getBaseTimestamp());
if (compFieldType instanceof IReferenceableElement) {
final Declaration decl = ((IReferenceableElement) compFieldType).resolveReference(reference, localIndex + 1, lastSubreference);
return decl != null ? decl : Declaration.createInstance(getDefiningAssignment(), compField.getIdentifier());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment