List[(Double, Double)]

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

List[(Double, Double)]

Meeraj Kunnumpurath
Hello,

The following two lines seem to be killing the compiler

val x = List((1.0, 2.0))
x.map { case(x, y) => x + y }

However, the below seems to be working

List((1.0, 2.0)).map { case(x, y) => x + y }

Thank you

--
Meeraj Kunnumpurath

--
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: List[(Double, Double)]

Roland Kuhn
Killed how? And which version of which compiler?

Welcome to Scala 2.12.1 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_121).
Type in expressions for evaluation. Or try :help.

scala> val x = List((1.0, 2.0))
x: List[(Double, Double)] = List((1.0,2.0))

scala> x.map { case(x, y) => x + y }
res0: List[Double] = List(3.0)

(it would have surprised me a lot if this expression did not compile)

Regards,

Roland

11 feb. 2017 kl. 17:54 skrev Meeraj Kunnumpurath <[hidden email]>:

Hello,

The following two lines seem to be killing the compiler

val x = List((1.0, 2.0))
x.map { case(x, y) => x + y }

However, the below seems to be working

List((1.0, 2.0)).map { case(x, y) => x + y }

Thank you

--
Meeraj Kunnumpurath

--
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: List[(Double, Double)]

Meeraj Kunnumpurath
Thank you

Welcome to Scala version 2.11.5 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_20).

java.lang.AssertionError: assertion failed: List(value _1$mcD$sp, value _1$mcD$sp, value _1$mcD$sp)

at scala.reflect.internal.Symbols$Symbol.suchThat(Symbols.scala:1916)

at scala.tools.nsc.transform.SpecializeTypes$$anon$2.matchingSymbolInPrefix$1(SpecializeTypes.scala:1460)

.....

That entry seems to have slain the compiler.  Shall I replay

your session? I can re-run each line except the last one.


On Sat, Feb 11, 2017 at 9:06 PM, Roland Kuhn <[hidden email]> wrote:
Killed how? And which version of which compiler?

Welcome to Scala 2.12.1 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_121).
Type in expressions for evaluation. Or try :help.

scala> val x = List((1.0, 2.0))
x: List[(Double, Double)] = List((1.0,2.0))

scala> x.map { case(x, y) => x + y }
res0: List[Double] = List(3.0)

(it would have surprised me a lot if this expression did not compile)

Regards,

Roland

11 feb. 2017 kl. 17:54 skrev Meeraj Kunnumpurath <[hidden email]>:

Hello,

The following two lines seem to be killing the compiler

val x = List((1.0, 2.0))
x.map { case(x, y) => x + y }

However, the below seems to be working

List((1.0, 2.0)).map { case(x, y) => x + y }

Thank you

--
Meeraj Kunnumpurath

--
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.




--
Meeraj Kunnumpurath
Director and Executive Principal
Service Symphony Ltd
00 44 7702 693597
00 971 50 409 0169
[hidden email]

--
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: List[(Double, Double)]

Meeraj Kunnumpurath
Updated to 2.11.7 and runs okay.

Thank you
Meeraj

On Sat, Feb 11, 2017 at 9:17 PM, Meeraj Kunnumpurath <[hidden email]> wrote:
Thank you

Welcome to Scala version 2.11.5 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_20).

java.lang.AssertionError: assertion failed: List(value _1$mcD$sp, value _1$mcD$sp, value _1$mcD$sp)

at scala.reflect.internal.Symbols$Symbol.suchThat(Symbols.scala:1916)

at scala.tools.nsc.transform.SpecializeTypes$$anon$2.matchingSymbolInPrefix$1(SpecializeTypes.scala:1460)

.....

That entry seems to have slain the compiler.  Shall I replay

your session? I can re-run each line except the last one.


On Sat, Feb 11, 2017 at 9:06 PM, Roland Kuhn <[hidden email]> wrote:
Killed how? And which version of which compiler?

Welcome to Scala 2.12.1 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_121).
Type in expressions for evaluation. Or try :help.

scala> val x = List((1.0, 2.0))
x: List[(Double, Double)] = List((1.0,2.0))

scala> x.map { case(x, y) => x + y }
res0: List[Double] = List(3.0)

(it would have surprised me a lot if this expression did not compile)

Regards,

Roland

11 feb. 2017 kl. 17:54 skrev Meeraj Kunnumpurath <[hidden email]>:

Hello,

The following two lines seem to be killing the compiler

val x = List((1.0, 2.0))
x.map { case(x, y) => x + y }

However, the below seems to be working

List((1.0, 2.0)).map { case(x, y) => x + y }

Thank you

--
Meeraj Kunnumpurath

--
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.




--
Meeraj Kunnumpurath
Director and Executive Principal
Service Symphony Ltd
00 44 7702 693597
00 971 50 409 0169
[hidden email]




--
Meeraj Kunnumpurath
Director and Executive Principal
Service Symphony Ltd
00 44 7702 693597
00 971 50 409 0169
[hidden email]

--
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: List[(Double, Double)]

Roland Kuhn
In reply to this post by Meeraj Kunnumpurath
I don’t have 2.11.5 handy, but 2.11.2 works just fine for me.

Your JDK version is very much outdated, though.

Regards,

Roland

11 feb. 2017 kl. 18:17 skrev Meeraj Kunnumpurath <[hidden email]>:

Thank you

Welcome to Scala version 2.11.5 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_20).

java.lang.AssertionError: assertion failed: List(value _1$mcD$sp, value _1$mcD$sp, value _1$mcD$sp)

at scala.reflect.internal.Symbols$Symbol.suchThat(Symbols.scala:1916)


at scala.tools.nsc.transform.SpecializeTypes$$anon$2.matchingSymbolInPrefix$1(SpecializeTypes.scala:1460)

.....

That entry seems to have slain the compiler.  Shall I replay


your session? I can re-run each line except the last one.


On Sat, Feb 11, 2017 at 9:06 PM, Roland Kuhn <[hidden email]> wrote:
Killed how? And which version of which compiler?

Welcome to Scala 2.12.1 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_121).
Type in expressions for evaluation. Or try :help.

scala> val x = List((1.0, 2.0))
x: List[(Double, Double)] = List((1.0,2.0))

scala> x.map { case(x, y) => x + y }
res0: List[Double] = List(3.0)

(it would have surprised me a lot if this expression did not compile)

Regards,

Roland

11 feb. 2017 kl. 17:54 skrev Meeraj Kunnumpurath <[hidden email]>:

Hello,

The following two lines seem to be killing the compiler

val x = List((1.0, 2.0))
x.map { case(x, y) => x + y }

However, the below seems to be working

List((1.0, 2.0)).map { case(x, y) => x + y }

Thank you

-- 
Meeraj Kunnumpurath

-- 
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.




-- 
Meeraj Kunnumpurath
Director and Executive Principal
Service Symphony Ltd
00 44 7702 693597
00 971 50 409 0169
[hidden email]


-- 
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: List[(Double, Double)]

Meeraj Kunnumpurath
Thanks.

I noticed the JDK version, it is not a machine I normally use for dev.

Thank you

Sent from my iPhone

On Feb 11, 2017, at 9:21 PM, Roland Kuhn <[hidden email]> wrote:

I don’t have 2.11.5 handy, but 2.11.2 works just fine for me.

Your JDK version is very much outdated, though.

Regards,

Roland

11 feb. 2017 kl. 18:17 skrev Meeraj Kunnumpurath <[hidden email]>:

Thank you

Welcome to Scala version 2.11.5 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_20).

java.lang.AssertionError: assertion failed: List(value _1$mcD$sp, value _1$mcD$sp, value _1$mcD$sp)

at scala.reflect.internal.Symbols$Symbol.suchThat(Symbols.scala:1916)


at scala.tools.nsc.transform.SpecializeTypes$$anon$2.matchingSymbolInPrefix$1(SpecializeTypes.scala:1460)

.....

That entry seems to have slain the compiler.  Shall I replay


your session? I can re-run each line except the last one.


On Sat, Feb 11, 2017 at 9:06 PM, Roland Kuhn <[hidden email]> wrote:
Killed how? And which version of which compiler?

Welcome to Scala 2.12.1 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_121).
Type in expressions for evaluation. Or try :help.

scala> val x = List((1.0, 2.0))
x: List[(Double, Double)] = List((1.0,2.0))

scala> x.map { case(x, y) => x + y }
res0: List[Double] = List(3.0)

(it would have surprised me a lot if this expression did not compile)

Regards,

Roland

11 feb. 2017 kl. 17:54 skrev Meeraj Kunnumpurath <[hidden email]>:

Hello,

The following two lines seem to be killing the compiler

val x = List((1.0, 2.0))
x.map { case(x, y) => x + y }

However, the below seems to be working

List((1.0, 2.0)).map { case(x, y) => x + y }

Thank you

-- 
Meeraj Kunnumpurath

-- 
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.




-- 
Meeraj Kunnumpurath
Director and Executive Principal
Service Symphony Ltd
00 44 7702 693597
00 971 50 409 0169
[hidden email]


-- 
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.