Re: Type inference in extension methods...

Sébastien Lorion <[email protected]>
Newsgroups gmane.comp.windows.devel.dotnet.advanced
Message-ID <[email protected]>
Offtopic: MTV is sure to win some non-glorious award for their email notice!

Sébastien
On Fri, Jan 16, 2009 at 11:09 AM, Nicholls, Mark <[email protected]>wrote:

> It's too difficult to tell....
>
> I think it should...
>
> I think it should basically end up doing (roughly) the equivalent of
>
> A<X> : A<Y> => X==Y...recursively
>
> This should lead to an answer in my example.
>
> If I could step through the inference I would stand a chance...
> Or if it said...."I can't infer it because XYZ" then I'd still have a
> chance.
>
> It's a bit like trying to fix code that you can neither debug or put
> trace statements in. You just put stuff it and it either works or not.
>
> > -----Original Message-----
> > From: Discussion of advanced .NET topics. [mailto:ADVANCED-
> > [email protected]] On Behalf Of Fabian Schmied
> > Sent: 16 January 2009 15:26
> > To: [email protected]
> > Subject: Re: [ADVANCED-DOTNET] Type inference in extension methods...
> >
> > Hi Marc!
> >
> > > I've simplified it as much as I can! and created and
> example....Boom9
> > does work...Boom10 wont infer...even though there is a solution
> > (explicitly stated)...and there's not another obvious one
> >
> > The C# compiler's goal is (probably) not to be able to infer the
> > correct solution in every possible case.
> > Instead, there is a defined set of rules the compiler follows. You can
> > read up on them here:
> > <http://download.microsoft.com/download/3/8/8/388e7205-bc10-4226-b2a8-
> > 75351c669b09/csharp%20language%20specification.doc>
> > (pages 142ff.).
> >
> > When you've read them, do you still think the compiler should be able
> > to find the solution in your sample?
> >
> > Fabian
> >
> > ===================================
> > View archives and manage your subscription(s) at
> > http://peach.ease.lsoft.com/archives
>
>
>
> CONFIDENTIALITY NOTICE
>
> This e-mail (and any attached files) is confidential and protected by
> copyright (and other intellectual property rights). If you are not the
> intended recipient please e-mail the sender and then delete the email and
> any attached files immediately. Any further use or dissemination is
> prohibited.
>
> While MTV Networks Europe has taken steps to ensure that this email and
> any attachments are virus free, it is your responsibility to ensure that
> this message and any attachments are virus free and do not affect your
> systems / data.
>
> Communicating by email is not 100% secure and carries risks such as delay,
> data corruption, non-delivery, wrongful interception and unauthorised
> amendment. If you communicate with us by e-mail, you acknowledge and
> assume these risks, and you agree to take appropriate measures to minimise
> these risks when e-mailing us.
>
> MTV Networks International, MTV Networks UK & Ireland, Greenhouse,
> Nickelodeon Viacom Consumer Products, VBSi, Viacom Brand Solutions
> International and Comedy Central are all trading names of MTV Networks
> Europe.  MTV Networks Europe is a partnership between MTV Networks Europe
> Inc. and Viacom Networks Europe Inc.  Address for service in Great Britain
> is UK House, 180 Oxford Street, London W1D 1DS, UK.
>
> ===================================
> View archives and manage your subscription(s) at
> http://peach.ease.lsoft.com/archives
>

===================================
View archives and manage your subscription(s) at http://peach.ease.lsoft.com/archives
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.