Overloaded method compile bug?
Posted: Tue Aug 14, 2012 9:48 pm
Compiling the following code, in a file named ESutils.cobra , on a Win 7 notebook resulted in the lengthy error msg posted below. Yes, I realize the code is goofy and makes no common sense, and that the method arguments are never used, but that's because I had to hack repeatedly at the original code in order to get it small enough to intelligently post here, while still replicating the error.
error msg:
Any comments? If the fault is mine and I'm missing something obvious in my code causing the error, I can't spot it.
- Code: Select all
namespace ESutils_
class Program
def main
print 'hello'
class MyRandom inherits Random
cue init
base.init
enum Coin
heads, tails
def next(lowValue as int, highValue as int) as int #fix next from random class,
assert lowValue <= highValue
assert highValue + 1 <= int.maxValue
return base.next(lowValue, highValue + 1)
def next(lowPitchName as Coin, highPitchName as Coin) as int #fix next from random class,
lowValue = 1 #lowPitchName to int
highValue = 2 #highPitchName to int
assert lowValue <= highValue
assert highValue + 1 <= int.maxValue
return base.next(lowValue, highValue + 1)
error msg:
C:\Users\Paul\Desktop\foldername>cobra esutils
error: COBRA INTERNAL ERROR / FallThroughException / info=MemberOverload-sh(9422, name=next, didBindInh=false, didStartBindInt=true, didBindInt=true,
didBindImp=false, token=Token.empty, name=next, isNames=['public'], numMembers=3, parentBox=Class-mi(1525, name=Random, didStartBindInh=true, didBindI
nh=true, didStartBindInt=true, didBindInt=true, didBindImp=false, token=Token.empty, didBindInh=true, isGeneric=false, isGenericDef=false, needsConstr
uction=false, 1525), 9422)
Compilation failed - 1 error, 0 warnings
Not running due to errors above.
Any comments? If the fault is mine and I'm missing something obvious in my code causing the error, I can't spot it.