Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Scala 2.9.1
    • Fix Version/s: Scala 2.10.0-M3
    • Component/s: None
    • Environment:

      Latest eclipse plugin on Win7

      Description

      Most of the collections lib is, and so it's pretty surprising that this isn't:

      scala> Map(1 -> 1).withDefaultValue(1)
      res9: scala.collection.immutable.Map[Int,Int] = Map(1 -> 1)
       
      scala> import java.io._
      import java.io._
       
      scala> val buffer = new ByteArrayOutputStream
      buffer: java.io.ByteArrayOutputStream = 
       
      scala> val out = new ObjectOutputStream(buffer)
      out: java.io.ObjectOutputStream = java.io.ObjectOutputStream@60232fff
       
      scala> out writeObject res9
      java.io.NotSerializableException: scala.collection.immutable.Map$WithDefault
      	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1180)
      	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:346)
      	at .<init>(<console>:41)
      	at .<clinit>(<console>)
      	at $anonfun$1.apply(<console>:7)
      	at $anonfun$1.apply(<console>:6)
      	at scala.tools.nsc.interpreter.Phased$class.atCurrent(Phased.scala:71)
      	at scala.tools.nsc.interpreter.Power$$anon$3.atCurrent(Power.scala:413)
      	at .<init>(<console>:6)
      	at .<clinit>(<console>)
      	at $print(<console>)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:601)
      	at scala.tools.nsc.interpreter.IMain$ReadEvalPrint.call(IMain.scala:775)
      	at scala.tools.nsc.interpreter.IMain$Request$$anonfun$18.apply(IMain.scala:1039)
      	at scala.tools.nsc.interpreter.Line.scala$tools$nsc$interpreter$Line$$runAndSetState(Line.scala:41)
      	at scala.tools.nsc.interpreter.Line$$anonfun$2.apply$mcV$sp(Line.scala:47)
      	at scala.tools.nsc.io.package$$anon$2.run(package.scala:22)
      	at java.lang.Thread.run(Thread.java:722)
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                prokopec Aleksandar Prokopec
                Reporter:
                dlwh david hall
              • Votes:
                4 Vote for this issue
                Watchers:
                11 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: