From: Niklas Holsti <niklas.holsti@tidorum.invalid>
Subject: Re: Odd subtyping error.
Date: Fri, 05 Oct 2012 21:12:16 +0300
Date: 2012-10-05T21:12:16+03:00 [thread overview]
Message-ID: <ad8m81FtdrcU1@mid.individual.net> (raw)
In-Reply-To: <99b6ed38-0a44-4649-82b7-0b724fa5e68f@googlegroups.com>
On 12-10-05 19:05 , Shark8 wrote:
> I'm making a new OpenGL binding taking advantage of Ada 2012 and have come across several interesting errors, including a compiler-bug... but this one is by far the oddest:
>
> Type Pixel_Storage is (
> UNPACK_SWAP_BYTES, UNPACK_LSB_FIRST, UNPACK_ROW_LENGTH,
> UNPACK_SKIP_ROWS, UNPACK_SKIP_PIXELS, UNPACK_ALIGNMENT,
> PACK_SWAP_BYTES, PACK_LSB_FIRST, PACK_ROW_LENGTH,
> PACK_SKIP_ROWS, PACK_SKIP_PIXELS, PACK_ALIGNMENT,
> PACK_SKIP_IMAGES, PACK_IMAGE_HEIGHT, UNPACK_SKIP_IMAGES,
> UNPACK_IMAGE_HEIGHT
> ) with Size => Enum'Size;
>
> SubType Pixel_Packing is Pixel_Storage Range PACK_SWAP_BYTES..PACK_IMAGE_HEIGHT;
>
> Unless I'm just completely misunderstanding the above should be perfectly fine, yet it generates a few errors:
> warning: no more representation items for type "Pixel_Storage" defined at line 625
> representation item appears too late [private section representation-clause]
>
It would be easier to answer you if you showed a complete, minimal
example (i.e. an .ads file) where you have removed the irrelevant parts.
The second error/warning line suggests to me that you have declared
Pixel_Storage first as a "private" type, and that the full type
declaration, including the "with Size" clause, appears only in the
"private" part of the package declaration. Is that the case?
--
Niklas Holsti
Tidorum Ltd
niklas holsti tidorum fi
. @ .
next prev parent reply other threads:[~2012-10-11 7:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-05 16:05 Odd subtyping error Shark8
2012-10-05 18:12 ` Niklas Holsti [this message]
2012-10-05 18:44 ` Adam Beneschan
2012-10-05 21:08 ` Shark8
2012-10-05 21:00 ` Shark8
2012-10-05 22:11 ` Adam Beneschan
2012-10-05 22:19 ` Shark8
2012-10-06 3:08 ` Adam Beneschan
2012-10-06 4:40 ` Shark8
2012-10-06 21:21 ` sbelmont700
2012-10-06 22:08 ` Shark8
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox