Re: [scala-internals] java.lang.ClassFormatError: Duplicate field name&signature in class file

39 views
Skip to first unread message

Lukas Rytz

unread,
Sep 26, 2016, 5:37:01 AM9/26/16
to scala-i...@googlegroups.com

On Thu, Sep 22, 2016 at 4:02 PM, Samarjit Uppal <uppal...@gmail.com> wrote:
val f = {
       case object Obj extends T
       case class C(x: T)  extends T
       C(Obj)   // commenting this removes the error  
         trait T {
               def process: Int  = this match {
                   case Obj => 1  // commenting this also removes the error 
                   case C(t) => 0
               }
         }
   } 

The above code throws the error: java.lang.ClassFormatError: Duplicate field name&signature in class file $sess/cmd44$C$3

If I remove the C(Obj) line OR if I remove the case Obj => 1 line the error goes away.

Is this a known issue?


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

Samarjit Uppal

unread,
Sep 27, 2016, 3:07:36 AM9/27/16
to scala-internals

ok, thanks.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-interna...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages