Skip to content

Commit 15b5cbf

Browse files
committed
Review response: Adding error for type variable bounds being ill-formed after erasure
1 parent ce42388 commit 15b5cbf

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

accepted/future-releases/inline-classes/feature-specification.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -761,6 +761,22 @@ representation dependency on itself.
761761
always possible to find a non-inline type which is the ultimate
762762
representation type of any given inline type.*
763763

764+
Let
765+
<code>X<sub>1</sub> extends B<sub>1</sub>, .. X<sub>s</sub> extends B<sub>s</sub></code>
766+
be a declaration of the type parameters of a generic entity (*it could
767+
be a generic class, inline or not, or mixin, or typedef, or function*).
768+
Let <code>BB<sub>j</sub></code> be the result of recursively
769+
replacing every inline type that occurs in <code>B<sub>j</sub></code>,
770+
for _j_ in _1 .. s_.
771+
It is a compile-time error if
772+
<code>X<sub>1</sub> extends BB<sub>1</sub>, .. X<sub>s</sub> extends BB<sub>s</sub></code>
773+
has any compile-time errors.
774+
775+
*For example, this erasure step could map
776+
<code>X extends C<Y>, Y extends X</code> to
777+
<code>X extends Y, Y extends X</code>,
778+
which is an error.*
779+
764780
An inline class declaration _DV_ named `Inline` may declare one or
765781
more constructors. A constructor which is declared in an inline class
766782
declaration is also known as an _inline class constructor_.

0 commit comments

Comments
 (0)