Open kingjon3377 opened 5 years ago
I've confirmed the bug. However, please note that there is a very trivial workaround. Just remove &Category<String>
, since it's not doing any real work here, or replace it with &Category<Object>
.
Since all Iterable
s already inherit Category<Object>
, you can't "narrow" the sort of Category
on a subclass (that would be unsound). Instead, Ceylon just takes the intersection of Category<Object>&Category<String>
which is Category<Object>
since Category
is contravariant.
The following code fails to compile with a backend error:
The error is:
ceylon --version
reportsceylon version 1.3.3 0d594b3 (Contents May Differ)
, and it is installed on this Mac OS X Sierra system using Homebrew.