<div dir="ltr">Here is an interesting problem (based on VerseRangeTest.java):<div><div><br></div><div> private VerseRange gen_all = ...;<br></div><div><br></div><div><div> public void testKeyContainsVerse() {</div><div>
// this passes</div><div> assertTrue(gen_all.contains(gen11));</div><div> </div><div> // this fails</div><div> Key gen_allKey = gen_all;</div><div> assertTrue(gen_allKey.contains(gen11));</div>
<div> }</div></div></div><div><br></div><div style>This caught me out for a while. I think the second assert should pass but Key is an interface with a single non-overloaded contains():</div><div style><div> boolean contains(Key key);</div>
<div><br></div><div style>Whereas VerseRange contains overloaded methods like contains(Verse) that are not called because the Key interface is being used. At least that is what I think is happening.</div><div style><br></div>
<div style>Is this a bug?</div><div style><br></div><div style>Martin</div></div><div style><br></div><div style><br></div><div style><br></div><div style><br></div></div>