[nem-en] Compare two MType
Michal Moskal
michal.moskal at gmail.com
Thu Nov 23 10:01:44 CET 2006
On 11/22/06, vc <vc at rsdn.ru> wrote:
> > In completion I need compare two MType.
> >
> > I try to use MType.TryProvide(), but in some case it is get wrong result.
> >
> > For example, if type1 is 'array[string]' and type2 is 'array[T.123]' the
> > TryProvide() return false. But me need interpret it as same type.
> >
> > What me need to do?
>
> Me need filter extension methods for completion list. See ncc\typing\Typer.n
> lile 1464.
You need to call GetFreshType() on the method, ignore TyVars and match
MType returned against MType.Fun. It will have T.123 replaced with a
fresh type variable that will be substitued with string.
--
Michał
More information about the devel-en
mailing list