От: | _nn_ | www.nemerleweb.com | |
Дата: | 21.09.11 11:44 | ||
Оценка: |
using System.Collections.Generic;
class A
{
private a : /*1*/ List.[string] = /*2*/ List.[string]();
F() : void
{
def x = /*3*/ List.[string]();
}
}
В выражении A[B](...), ежели A и B типы, и A обобщенный тип, то это выражение трактуется как A.[B](...).
a.n:2:39:2:51: ←[01;31merror←[0m: cannot find any suitable indexer in 'List' (type is ? -> ?)
a.n:2:39:2:51: ←[01;31merror←[0m: cannot find any suitable indexer in 'List' (type is ? -> ?)
a.n:2:39:2:51: ←[01;31merror←[0m: cannot find any suitable indexer in 'List' (type is ? -> ?)
a.n:2:39:2:43: ←[01;31merror←[0m: typing fails on ambiguity between overloads:a.n:2:39:2:43: ←[01;32mhint←[0m: Posible overload: constructor System.Collections.Generic.List..ctor(collection : System.Collections.Generic.IEnumerable[T]) : System.Collections.Generic.List.[T]
a.n:2:39:2:43: ←[01;32mhint←[0m: Posible overload: constructor System.Collections.Generic.List..ctor(capacity : int) : System.Collections.Generic.List.[T]
a.n:2:39:2:43: ←[01;32mhint←[0m: Posible overload: constructor System.Collections.Generic.List..ctor() : System.Collections.Generic.List.[T]a.n:2:39:2:51: ←[01;31merror←[0m: cannot find any suitable indexer in 'List' (type is ? -> ?)
a.n:2:39:2:51: ←[01;31merror←[0m: typing fails on delayed typing of indexerconfused by earlier errors bailing out