|
|
| Author |
Message |
codeferret
Joined: 03 Jan 2012
Posts: 7
|
|
Posted: 04 January 2012, 20:24 PM Post subject: Overload difficulty within class |
|
|
I hate to seem like I'm flooding this forum with questions lately, but... consider the following code:
| Code: | option objects
public structure One
public bthing as byte
end structure
public structure Two
public ithing as integer
public sthing as string
end structure
'public class test
private function CheckSum( byval data as One ) as UnsignedInteger
end function
private function CheckSum( byval data as Two ) as UnsignedInteger
end function
'end class
public sub main()
end sub |
It compiles just fine, but if you uncomment the class definitions, it won't compile; it complains that the two functions have identical signatures.
The signature of the two functions should be different, I think - they take different types of parameters. But I think the compiler is treating them simply as type structure, not type One and Two.
Is there a way around this, other than renaming my function?
Thanks! |
|
| Back to top |
|
 |
dkinzer Site Admin
Joined: 03 Sep 2005
Posts: 2514
Location: Portland, OR
|
|
Posted: 04 January 2012, 21:17 PM Post subject: Re: Overload difficulty within class |
|
|
| codeferret wrote: | | Is there a way around this, other than renaming my function? | Unfortunately, no. This problem was discovered recently and has been corrected in our development version. I'll have to look into how complex the changes were to judge the feasibility of issuing an interim release with this correction. |
|
| Back to top |
|
 |
dkinzer Site Admin
Joined: 03 Sep 2005
Posts: 2514
Location: Portland, OR
|
|
Posted: 09 January 2012, 18:27 PM Post subject: |
|
|
| There is a new version of the compiler that corrects this problem among others. The new installer contains the same compiler version as well as an updated IDE that addresses a Win7 issue. |
|
| Back to top |
|
 |
|