diff --git a/plugins/org.eclipse.n4js.ts.model/model/TypeRefs.xcore b/plugins/org.eclipse.n4js.ts.model/model/TypeRefs.xcore index 3b8f1c51ee..a6976d1a12 100644 --- a/plugins/org.eclipse.n4js.ts.model/model/TypeRefs.xcore +++ b/plugins/org.eclipse.n4js.ts.model/model/TypeRefs.xcore @@ -820,8 +820,13 @@ abstract class StructuralTypeRef { * (if non-empty) or the genStructuralMembers. */ op TStructMember[] getStructuralMembers() { - return (if (structuralType !== null) structuralType.ownedMembers else if (!astStructuralMembers.empty) astStructuralMembers else genStructuralMembers). - unmodifiableView; + if (structuralType !== null) { + return structuralType.ownedMembers.unmodifiableView; + } + if (!astStructuralMembers.empty) { + return astStructuralMembers.unmodifiableView; + } + return genStructuralMembers.unmodifiableView; } op TStructMember[] getStructuralMembersWithCallConstructSignatures() { val structType = getStructuralType(); @@ -881,8 +886,13 @@ class ParameterizedTypeRefStructural extends ParameterizedTypeRef, StructuralTyp * (if non-empty) or the genStructuralMembers. */ op TStructMember[] getStructuralMembers() { - return (if (structuralType !== null) structuralType.ownedMembers else if (!astStructuralMembers.empty) astStructuralMembers else genStructuralMembers). - unmodifiableView; + if (structuralType !== null) { + return structuralType.ownedMembers.unmodifiableView; + } + if (!astStructuralMembers.empty) { + return astStructuralMembers.unmodifiableView; + } + return genStructuralMembers.unmodifiableView; } /* * Overrides {@link TypeRef#internalGetTypeRefAsString(boolean)}