class Li<out Element>(shared Element* items) {}
shared void run() {
Li<Li<String>> f = Li(Li("#1"));
Li<String>? ns = f.items[0];
value n = if (is Li<Anything> ns) then ns.items else (ns of Li<String>?); // ok
value o = if (is Li<Anything> ns) then ns.items else ns; // error
//Incompatible types
//required: ceylon.language.Sequential<? extends ceylon.language.String>
//found: simple.Li<capture#1 of ? extends ceylon.language.String>
}
The code below results in a backend error:
(Found when looking at https://github.com/ceylon/ceylon-compiler/issues/2422)