Ошибка при компиляции такого кода
using Nemerle.Collections;
using Nemerle.Text;
using Nemerle.Utility;
using System;
using System.Collections.Generic;
using System.Console;
using System.Linq;
module Program
{
Main() : void
{
def a = A.[B]();
def listB = List.[B]();
a.F1(listB);
a.F2(listB); // Main.n(17,12): error : in argument #1 (_N_wildcard_3510),
// needed a System.Collections.Generic.IEnumerable[T1+],
// got System.Collections.Generic.List[B]:
// B is not a subtype of T1 [simple require]
}
}
class A[T1]
{
public F1(_ : IEnumerable[T1]) : void {}
public F2[T2](_ : IEnumerable[T2]) : void where T2 : T1 {}
}
class B
{
}
Пример навеян Linq2Sql, метод A.F2 аналогичен Table.DeleteAllOnSubmit.
Это баг немерле или я что-то не так понимаю?