"Symbol undefined" on interface with public getter and package setter

Jacob Carlborg doob at me.com
Fri Feb 20 12:56:46 PST 2009


TSalm wrote:
> Hello,
> 
> When I compile the code below, I've got the following error :
>  OPTLINK (R) for Win32  Release 8.00.1
>  Copyright (C) Digital Mars 1989-2004  All rights reserved.
>  private_method_in_interface_file3.obj(private_method_in_interface_file3)
>   Error 42: Symbol Undefined 
> _D33private_method_in_interface_file31I4funcMFiZv
>  --- errorlevel 1
> 
> 
> /* ----- CODE ------ */
> interface I
> {
>    int func() ;
>    package void func(int);
> }
> 
> class A:I
> {
>   int i;
> 
>   package  void func(int i)
>   { this.i = i; }
> 
>   int func()
>   { return i; }
> }
> 
> void main()
> {
> 
>   I a = new A ;
>   a.func = 10 ;
>   Stdout(a.func).newline ;
> 
> }
> /* --- END CODE ---- */
> 
> 
> Thanks in advance for your help,
> TSalm

I'm not sure but I think package is not virtual.


More information about the Digitalmars-d-learn mailing list