scala.meta.internal.ast.MergeException

encountered unexpected trees during syntactic + semantic merge: Term.ApplyInfix(Lit(3), Term.Name("::"), Nil, Seq(Term.Name("x"))) Term.Block(Seq(Defn.Val(Nil, Seq(Pat.Var.Term(Term.Name("x$1"))), Some(Type.Name("Int")), Lit(3)), Term.Apply(Term.ApplyType(Term.Select(Term.Name("x"), Term.Name("::")), Seq(Type.Name("Int"))), Seq(Term.Name("x$1"))))) <-(Term.ApplyInfix) 3 :: x ->(Term.Block) { val x$1: Int = 3 x.::[Int](x$1) } <-(Term.Block) { val x = List(2) 3 :: x } ->(Term.Block) { val x: List[Int] = immutable.this.List.apply[Int](2) {...

Samebug tips0

There are no available Samebug tips for this exception. If you know how to solve this issue, help other users by writing a short tip.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web2

  • encountered unexpected trees during syntactic + semantic merge: Term.ApplyInfix(Lit(3), Term.Name("::"), Nil, Seq(Term.Name("x"))) Term.Block(Seq(Defn.Val(Nil, Seq(Pat.Var.Term(Term.Name("x$1"))), Some(Type.Name("Int")), Lit(3)), Term.Apply
  • encountered unexpected trees during syntactic + semantic merge: Term.ApplyInfix(Lit.Int(0), Term.Name("+"), Nil, Seq(Lit.Int(2))) Lit.Int(2) <-(Term.ApplyInfix) 0 + 2 ->(Lit.Int) 2
  • Stack trace

    • scala.meta.internal.ast.MergeException: encountered unexpected trees during syntactic + semantic merge: Term.ApplyInfix(Lit(3), Term.Name("::"), Nil, Seq(Term.Name("x"))) Term.Block(Seq(Defn.Val(Nil, Seq(Pat.Var.Term(Term.Name("x$1"))), Some(Type.Name("Int")), Lit(3)), Term.Apply(Term.ApplyType(Term.Select(Term.Name("x"), Term.Name("::")), Seq(Type.Name("Int"))), Seq(Term.Name("x$1"))))) <-(Term.ApplyInfix) 3 :: x ->(Term.Block) { val x$1: Int = 3 x.::[Int](x$1) } <-(Term.Block) { val x = List(2) 3 :: x } ->(Term.Block) { val x: List[Int] = immutable.this.List.apply[Int](2) {... at scala.meta.internal.ast.mergeTrees$.fail(MergeTrees.scala:403) at scala.meta.internal.ast.mergeTrees$.scala$meta$internal$ast$mergeTrees$$failCorrelate(MergeTrees.scala:368) at scala.meta.internal.ast.mergeTrees$loop$2$.apply(MergeTrees.scala:266) at scala.meta.internal.ast.mergeTrees$.apply(MergeTrees.scala:338) at scala.meta.internal.ast.mergeTrees$loop$2$.apply(MergeTrees.scala:47) at scala.meta.internal.ast.mergeTrees$loop$2$$anonfun$apply$2.apply(MergeTrees.scala:330) at scala.meta.internal.ast.mergeTrees$loop$2$$anonfun$apply$2.apply(MergeTrees.scala:330) at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:245) at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:245) at scala.collection.immutable.List.foreach(List.scala:381)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    You’re the first here who have seen this exception.