- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
suddenly
Sat, 2012-01-14, 00:03
We use 2.8
Now, in a piece of code that was not touched, the compiler says this:
Connection.scala:27: error: object Array is not a value
[INFO] val child = new URLClassLoader(Array[URL](new File(path).toURI.toURL),getClass.getClassLoader)
I do not understand it, and I do not see an error either...
Thanks,
-Vlad
Now, in a piece of code that was not touched, the compiler says this:
Connection.scala:27: error: object Array is not a value
[INFO] val child = new URLClassLoader(Array[URL](new File(path).toURI.toURL),getClass.getClassLoader)
I do not understand it, and I do not see an error either...
Thanks,
-Vlad
Sat, 2012-01-14, 00:31
#2
Re: suddenly
Thank you; seems like this is the case. Was fixed by using List(...).toArray.
Still, probably makes sense to file a bug; the message is pretty confusing.
Thanks,
-Vlad
On Fri, Jan 13, 2012 at 3:14 PM, Jason Zaugg <jzaugg@gmail.com> wrote:
Still, probably makes sense to file a bug; the message is pretty confusing.
Thanks,
-Vlad
On Fri, Jan 13, 2012 at 3:14 PM, Jason Zaugg <jzaugg@gmail.com> wrote:
Sounds like you've introduced an import that binds the identifier to `Array` to a Java class, rather than `scala.Array`.
scala> String(1)<console>:8: error: object String is not a value String(1) ^
-jason
On Sat, Jan 14, 2012 at 12:02 AM, Vlad Patryshev <vpatryshev@gmail.com> wrote:
We use 2.8
Now, in a piece of code that was not touched, the compiler says this:
Connection.scala:27: error: object Array is not a value
[INFO] val child = new URLClassLoader(Array[URL](new File(path).toURI.toURL),getClass.getClassLoader)
I do not understand it, and I do not see an error either...
Thanks,
-Vlad
Sat, 2012-01-14, 00:41
#3
Re: suddenly
So, what happened.
First, we did not have an import of a class Array. But we had
import java.sql.{Connection,Driver... } - in total more than five classes listed.
So IntelliJ's scala plugin replaced it with java.sql._
and java.sql package has a class called Array.
=> Evil!
Thanks,
-Vlad
On Fri, Jan 13, 2012 at 3:21 PM, Vlad Patryshev <vpatryshev@gmail.com> wrote:
First, we did not have an import of a class Array. But we had
import java.sql.{Connection,Driver... } - in total more than five classes listed.
So IntelliJ's scala plugin replaced it with java.sql._
and java.sql package has a class called Array.
=> Evil!
Thanks,
-Vlad
On Fri, Jan 13, 2012 at 3:21 PM, Vlad Patryshev <vpatryshev@gmail.com> wrote:
Thank you; seems like this is the case. Was fixed by using List(...).toArray.
Still, probably makes sense to file a bug; the message is pretty confusing.
Thanks,
-Vlad
On Fri, Jan 13, 2012 at 3:14 PM, Jason Zaugg <jzaugg@gmail.com> wrote:Sounds like you've introduced an import that binds the identifier to `Array` to a Java class, rather than `scala.Array`.
scala> String(1)<console>:8: error: object String is not a value String(1) ^
-jason
On Sat, Jan 14, 2012 at 12:02 AM, Vlad Patryshev <vpatryshev@gmail.com> wrote:
We use 2.8
Now, in a piece of code that was not touched, the compiler says this:
Connection.scala:27: error: object Array is not a value
[INFO] val child = new URLClassLoader(Array[URL](new File(path).toURI.toURL),getClass.getClassLoader)
I do not understand it, and I do not see an error either...
Thanks,
-Vlad
Sat, 2012-01-14, 00:51
#4
Re: suddenly
On Sat, Jan 14, 2012 at 12:26 AM, Vlad Patryshev <vpatryshev@gmail.com> wrote:
I've lodged a bug: http://youtrack.jetbrains.net/issues/SCL?q=import+scala#
In the meantime, you could set the threshold for switching to wildcard imports to a large number.
-jason
So, what happened.
First, we did not have an import of a class Array. But we had
import java.sql.{Connection,Driver... } - in total more than five classes listed.
So IntelliJ's scala plugin replaced it with java.sql._
and java.sql package has a class called Array.
=> Evil!
I've lodged a bug: http://youtrack.jetbrains.net/issues/SCL?q=import+scala#
In the meantime, you could set the threshold for switching to wildcard imports to a large number.
-jason
Sat, 2012-01-14, 17:31
#5
RE: suddenly
It would be cool if scalac "knew" about certain Scala classes, like Map/Iterable/Array/Set etc etc and decided to fully-qualify such error messages that are involved in name clashes:
"java.sql.Array is not a value"
I'll bet all of us have been puzzled many a time by similar wtf? errors
Chris
From: jzaugg@gmail.com
Date: Sat, 14 Jan 2012 00:32:23 +0100
Subject: Re: [scala-user] suddenly
To: vpatryshev@gmail.com
CC: scala-user@googlegroups.com
On Sat, Jan 14, 2012 at 12:26 AM, Vlad Patryshev <vpatryshev@gmail.com> wrote:
I've lodged a bug: http://youtrack.jetbrains.net/issues/SCL?q=import+scala#
In the meantime, you could set the threshold for switching to wildcard imports to a large number.
-jason
"java.sql.Array is not a value"
I'll bet all of us have been puzzled many a time by similar wtf? errors
Chris
From: jzaugg@gmail.com
Date: Sat, 14 Jan 2012 00:32:23 +0100
Subject: Re: [scala-user] suddenly
To: vpatryshev@gmail.com
CC: scala-user@googlegroups.com
On Sat, Jan 14, 2012 at 12:26 AM, Vlad Patryshev <vpatryshev@gmail.com> wrote:
So, what happened.
First, we did not have an import of a class Array. But we had
import java.sql.{Connection,Driver... } - in total more than five classes listed.
So IntelliJ's scala plugin replaced it with java.sql._
and java.sql package has a class called Array.
=> Evil!
I've lodged a bug: http://youtrack.jetbrains.net/issues/SCL?q=import+scala#
In the meantime, you could set the threshold for switching to wildcard imports to a large number.
-jason
Sun, 2012-01-15, 10:01
#6
Re: suddenly
Instead of going by special classes, the rule could be "any identifier that was shadowed by an import etc." should have its FQN in error messages.
On Sat, Jan 14, 2012 at 11:21 AM, Chris Marshall <oxbow_lakes@hotmail.com> wrote:
On Sat, Jan 14, 2012 at 11:21 AM, Chris Marshall <oxbow_lakes@hotmail.com> wrote:
It would be cool if scalac "knew" about certain Scala classes, like Map/Iterable/Array/Set etc etc and decided to fully-qualify such error messages that are involved in name clashes:
"java.sql.Array is not a value"
I'll bet all of us have been puzzled many a time by similar wtf? errors
Chris
From: jzaugg@gmail.com
Date: Sat, 14 Jan 2012 00:32:23 +0100
Subject: Re: [scala-user] suddenly
To: vpatryshev@gmail.com
CC: scala-user@googlegroups.com
On Sat, Jan 14, 2012 at 12:26 AM, Vlad Patryshev <vpatryshev@gmail.com> wrote:So, what happened.
First, we did not have an import of a class Array. But we had
import java.sql.{Connection,Driver... } - in total more than five classes listed.
So IntelliJ's scala plugin replaced it with java.sql._
and java.sql package has a class called Array.
=> Evil!
I've lodged a bug: http://youtrack.jetbrains.net/issues/SCL?q=import+scala#
In the meantime, you could set the threshold for switching to wildcard imports to a large number.
-jason
scala> String(1)<console>:8: error: object String is not a value String(1) ^
-jason
On Sat, Jan 14, 2012 at 12:02 AM, Vlad Patryshev <vpatryshev@gmail.com> wrote: