Showing inferred types of Scala expressions

前端 未结 3 878
梦谈多话
梦谈多话 2021-02-14 20:13

How can I see the types inferred by the Scala compiler for expressions etc.? I have some code with complicated type inference and implicit conversions, and it\'s hard to see wha

3条回答
  •  粉色の甜心
    2021-02-14 20:54

    It needs to be

    scalacOptions in Compile ++= Seq("-Xprint-types", "-Xprint:typer")
    

    instead.

    Unfortunately the output isn't very readable. :(

提交回复
热议问题