-
illegally exposing your Friend type
In Beta-2, I find that a function that returns an interface type gets
flagged as an error.
For example, I have an
Interface MultiChoice 'with 3 methods
Function getSelected() as ArrayList
Sub Clear()
Function getWindow() as Panel
End Interface
If I create a function
Public Function getBuilder (any arg or none) as MultiChoice
End Function
I get the error
getBuilder illegally exposes a Friend type outside the Public class
'wBuilder'
where "wBuilder" is the name of the class containing the function.
I don;t get it. I don't see any Friends being invoked anywhere. Is this
a bug?
It doesn't seem right to me, and of course it USED to work.
If I change that return type to Object, the program works fine, but
without any type checking, of course.
-
Re: illegally exposing your Friend type
Hi J W,
try declaring the Interface as Public, eg:
Public Interface MultiChoice
.....
"J W Cooper" <ctswim@ctswim.org> wrote in message
news:3B4C4C6E.D7360077@ctswim.org...
> In Beta-2, I find that a function that returns an interface type gets
> flagged as an error.
>
> For example, I have an
>
> Interface MultiChoice 'with 3 methods
> Function getSelected() as ArrayList
> Sub Clear()
> Function getWindow() as Panel
> End Interface
>
> If I create a function
>
> Public Function getBuilder (any arg or none) as MultiChoice
> End Function
>
> I get the error
>
> getBuilder illegally exposes a Friend type outside the Public class
> 'wBuilder'
>
> where "wBuilder" is the name of the class containing the function.
>
> I don;t get it. I don't see any Friends being invoked anywhere. Is this
> a bug?
> It doesn't seem right to me, and of course it USED to work.
>
> If I change that return type to Object, the program works fine, but
> without any type checking, of course.
>
>
-
Re: illegally exposing your Friend type
That was it. Thanks.
Bill McCarthy wrote:
>
> try declaring the Interface as Public, eg:
>
> Public Interface MultiChoice
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks