From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Incompatible types for array conversion Date: Wed, 22 Jul 2015 08:13:22 +0100 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="0b8a1d07de517ba95be21a60d7133ef5"; logging-data="27944"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Tlc6Abeut5WEuGebBr0Csl4eg0sdSBws=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) Cancel-Lock: sha1:H7xmfItBPEouuZYQcU7toaWF9yI= sha1:xrrFxw55xB5aP/BQ3CsJ715qQPY= Xref: news.eternal-september.org comp.lang.ada:26960 Date: 2015-07-22T08:13:22+01:00 List-Id: Niklas Holsti writes: > The conversion is rejected because of the conversion condition in RM > 4.6 (24.5/2): "The component subtypes shall statically match". The > component (sub)types are Real and Length, which are different types, > although Length is derived from Real. If you change the declaration of > Length to be > > subtype Length is Real; > > the conversion becomes legal. I tried generic dim: positive; type Real is digits <>; package Vectors is type Vector is array (1..dim) of Real'Base; but it still failed. (GPL 2015, FSF 5.1.0)