Language Change Specification for closely-related record types


LCS Number: LCS-2016-075
Version: 1
Date: 20-Dec-2016
Status: In progress
Author: Ryan Hinton
Email: Main.RyanHinton
Source Doc: Closely related record types
Summary: Add a definition of a closely-related record type so type conversions are possible.

Voting Results: Cast your votes here


  1. Ryan Hinton - 2016-12-20 - ver 1
  2. Patrick Lehmann - 2016-12-31 - ver 1
  3. Martin Thompson- 2017-02-17 Version 1
  4. Jim Lewis- 2017-02-21 Version 1
  5. Thomas Preusser - 2017-02-23 - ver 1
  6. Martin Zabel - 2017-01-25 - ver 1



  1. Brent Hayhoe - 2017-02-16 Version 1 - Abstain due to lack of personal time for review.

Details of Language Change

Additions are in red font. Deletions are crossed out. Editing notes are in green font.

Section 9.3.6 Type Conversions

Page 137 (pdf 151) near the middle.

Explicit type conversions are allowed between closely related types. In particular, a type is closely related to itself. Other types are closely related only under the following conditions:

  • Abstract numeric types -- Any abstract numeric type is closely related to any other abstract numeric type.
  • Array types -- Two array types are closely related if and only if the types have the same dimensionality and the element types are closely related.
  • Record types -- Two record types are closely related if and only if each element of the target type has a matching element (see 9.2.3) in the type of the operand, and the corresponding types for matching elements are closely related.

Page 138 (pdf 152), third paragraph.

In a type or subtype conversion where the target type is a record type, the value of each element of the result is that of the matching element of the operand (see 9.2.3) converted to the subtype of the element of the result.

... (move to notes at the end of this section)

NOTE 2--Two distinct record types are not closely related, even if they have the same element identifiers and element subtypes. A record type is, however, closely related to itself. Hence, an operand of a record type can be converted to a subtype of the record type. (The prohibitive part is no longer correct. We can keep the permissive parts if someone thinks they still have value.)

-- RyanHinton - 2016-12-20


To review the LCS, I need the whole text of the note you deleted. Some of your editing colors are off and it is hard to see that you are deleting the sub in front of subtype.

-- Jim Lewis - 2016-12-21

Colors improved, added more explanatory text. I didn't bump the revision because there are no normative changes.

-- Ryan Hinton - 2016-12-21

It is only an editing note, but what is meant by: "(The second paragraph on this page describes record subtype conversions once a type conversion is defined for a record type.)"?

The 2nd paragraph on page 138 addresses arrays only, doesn't it?

-- Martin Zabel - 2017-01-23

Good point. It appears I may have been referring back to the text I just changed.... I've modified the text slightly to include type and subtype conversions.

-- Ryan Hinton - 2017-02-10

Topic revision: r13 - 2017-04-02 - 15:43:35 - PatrickLehmann
Copyright © 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback