- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
New arrays and Java varargs (Was: New arrays are here)
Tue, 2009-09-22, 14:17
On Mon, Sep 21, 2009 at 2:01 PM, martin odersky wrote:
> New arrays have landed in trunk. This was the hardest on longest bug
> fix I ever did! There are still some things to clean up, but I checked
> in anyway because I am seriously running out of time.
Before I open a Trac ticket ...
Is the following change from 2.7.5 expected as a consequence of the
array update or is it a regression?
J.java
public class J {
public void m(Object... args) {}
}
S.scala:
object Test {
def main(args : Array[String]) {
(new J).m(Array(Array('a', 'b', 'c')) : _*)
}
}
miles@lewis:scala$ scala/dists/latest/bin/scalac J.java S.scala
S.scala:3: error: type mismatch;
found : Array[Array[Char]]
required: Array[java.lang.Object]
(new J).m(Array(Array('a', 'b', 'c')) : _*)
^
one error found
With 2.7.x this compiles without error.
Cheers,
Miles
Wed, 2009-09-23, 18:07
#2
Re: New arrays and Java varargs (Was: New arrays are here)
On Tue, Sep 22, 2009 at 2:45 PM, martin odersky wrote:
> I think I can fix this. Wait until tomorrow...
[18755] seems to have done the trick ... thanks ...
Cheers,
Miles
Thu, 2009-09-24, 09:17
#3
Re: New arrays and Java varargs (Was: New arrays are here)
On Wed, Sep 23, 2009 at 6:59 PM, Miles Sabin wrote:
> On Tue, Sep 22, 2009 at 2:45 PM, martin odersky wrote:
>> I think I can fix this. Wait until tomorrow...
>
> [18755] seems to have done the trick ... thanks ...
>
I did not have the time to test that yet. Glad that it worked.
Thu, 2009-09-24, 09:27
#4
Re: New arrays and Java varargs (Was: New arrays are here)
Hi, Martin,
Thanks for the quick fix of #2381, I tested it on my machine, now all
Scala code of NetBeans plugin works.
Then, I filed another issue related to new Arrays
https://lampsvn.epfl.ch/trac/scala/ticket/2386
Cheers,
-Caoyuan
On Thu, Sep 24, 2009 at 4:09 PM, martin odersky wrote:
> On Wed, Sep 23, 2009 at 6:59 PM, Miles Sabin wrote:
>> On Tue, Sep 22, 2009 at 2:45 PM, martin odersky wrote:
>>> I think I can fix this. Wait until tomorrow...
>>
>> [18755] seems to have done the trick ... thanks ...
>>
> I did not have the time to test that yet. Glad that it worked.
>
> -- Martin
>
Thu, 2009-09-24, 09:37
#5
Re: New arrays and Java varargs (Was: New arrays are here)
On Thu, Sep 24, 2009 at 10:13 AM, Caoyuan wrote:
> Hi, Martin,
>
> Thanks for the quick fix of #2381, I tested it on my machine, now all
> Scala code of NetBeans plugin works.
>
Glad to know that! I ma happy that it was not so hard to port to the
new arrays then.
> Then, I filed another issue related to new Arrays
> https://lampsvn.epfl.ch/trac/scala/ticket/2386
>
I'll be able to have a look at this soon, I hope.
Cheers
On Tue, Sep 22, 2009 at 3:17 PM, Miles Sabin wrote:
> On Mon, Sep 21, 2009 at 2:01 PM, martin odersky wrote:
>> New arrays have landed in trunk. This was the hardest on longest bug
>> fix I ever did! There are still some things to clean up, but I checked
>> in anyway because I am seriously running out of time.
>
> Before I open a Trac ticket ...
>
> Is the following change from 2.7.5 expected as a consequence of the
> array update or is it a regression?
>
I think I can fix this. Wait until tomorrow...
Cheers