www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.ide
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript
electronics



digitalmars.D.learn - Error: hidden method called for ports.OutBound

↑ ↓ ← D newb <as asg.oe> writes:
When I run my program I get the following output:

Error: hidden method called for ports.OutBound

How do I know which is the hidden function call? I tried ddbg but it won't
allow me to insert commands after the error.

OutBound is a sub-class of Port which in turn is a subclass of Thread.
May 08 2008
→ "Steven Schveighoffer" <schveiguy yahoo.com> writes:
"D newb" wrote
 When I run my program I get the following output:

 Error: hidden method called for ports.OutBound

 How do I know which is the hidden function call? I tried ddbg but it won't 
 allow me to insert commands after the error.

 OutBound is a sub-class of Port which in turn is a subclass of Thread.

This is due to the class OutBound overriding a function from Port or Thread, but not overriding all overloads. For example: class A { void foo(){} } class B: A { void foo(int x){} // didn't override foo(), so it is a hidden function } A a = new B; a.foo(); // throws hidden func error. To rectify this situation, have B overload foo(), or alias A's foo into B: class B : A { void foo() {} void foo(int x) {} } or class B : A { alias A.foo foo; void foo(int x) {} } You need to translate to your specific class hierarchy. -Steve
May 08 2008
→ Pedro Ferreira <ask me.pt> writes:
D newb escreveu:
 When I run my program I get the following output:
 
 Error: hidden method called for ports.OutBound
 
 How do I know which is the hidden function call? I tried ddbg but it won't
allow me to insert commands after the error.
 
 OutBound is a sub-class of Port which in turn is a subclass of Thread.

Try compiling with "-w". That should warn you about calling hidden methods.
May 08 2008