I did some research, and it looks like VB indeed allows properties to
be passed by reference. Chad said that making it readonly or removing
the visibility restriction on the setter solved the problem, I wonder
if that's because the compiler would choose a different overload of
That. If that's the case then we've hit a corner case and we should
address it specifically, but if every time you pass a property in VB
the compiler chooses the overload with the ref modifier then it would
make sense to remove that overload completely maybe.
2009/5/23, Charlie Poole <
cha...@nunit.com>:
> Yeah, it's a mystery to me too. I see the bug is filed, so we'll at least
> try to fix it for a point release.
>
> Charlie
>
>
> _____
>
> From:
nunit-...@googlegroups.com [mailto:
nunit-...@googlegroups.com]
> On Behalf Of Simone Busoli
> Sent: Monday, May 18, 2009 2:59 PM
> To:
nunit-...@googlegroups.com
> Subject: [nunit-discuss] Re: Tighter scoping on properties == compile error
> in Assert.That()?
>
>
> This is pretty weird, the overload resolution is completely different from
> that of C#, and it tries to use the generic That method with the ref
> modifier, which obviously requires the property to be settable publicly.
>
> On Fri, May 15, 2009 at 18:14, Chad Kittel <
chad....@gmail.com> wrote:
>
>
>
> I opened up a bug report for this issue on SourceForge and provided a
> small example to help someone repro it.
>
> Artifact number: 2792355
>
https://sourceforge.net/tracker/?func=detail
> <
https://sourceforge.net/tracker/?func=detail&aid=2792355&group_id=10749&ati
> d=110749> &aid=2792355&group_id=10749&atid=110749
>
>
>
>
>
>
>
>
>
> >
>
--
Inviato dal mio dispositivo mobile