logo       

Re: weirdness in typechecking call on overloaded java method: msg#00100

lang.scala

Subject: Re: weirdness in typechecking call on overloaded java method

"Jason Kinzer" <jmkinzer@xxxxxxxxx> writes:
> I've stumbled upon a typing issue I'm at a loss to explain. Following is a
> minimal test case:
>
> ---------------------------------------------
> // ScalaMenuTest.scala
> object ScalaMenuTest {
> def main(args: Array[String]): Unit = {
> val v = new javax.swing.JMenu()
> v.add(new javax.swing.JMenuItem())
> //v.add(new java.awt.PopupMenu());
> }
> }
>
> //==> compiling with scalac2 results in
> //
> // found : javax.swing.JMenuItem
> // required: java.awt.PopupMenu
> // v.add(new javax.swing.JMenuItem())
> // ^
> //one error found
> ---------------------------------------------

There have been problems like this, but your example compiles for
me using version 2.0.5843 and 2.0.5774 . Can you check your
version (scalac -version), and upgrade if it is older than these?

Otherwise, maybe it is environmental. I am using a 1.5 Sun SDK.

-Lex




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise