Skip to content

VerifyError with anon class passed to right assoc method in constructor argument of anon class that extends trait #6506

@scabug

Description

@scabug

https://github.com/espringe/wisp/blob/04a2c643933b0fec871ba186e233da0019802ebe/src/main/scala/wisp/reader.scala#L64

If you remove that temporary variable (and put the statement inline), the code the compiler generates results in:

Caught1: java.lang.VerifyError: (class:
wisp/Reader$$anonfun$wisp$Reader$$literalListParser$1$$anonfun$apply$36$$anon$7,
method: signature:
(Lwisp/Reader$$anonfun$wisp$Reader$$literalListParser$1$$anonfun$apply$36;Lscala/collection/immutable/List;)V)
Expecting to find object/array on stack

Easy enough to reproduce:

$ git clone git@github.com:espringe/wisp.git
$ cd wisp && git checkout 04a2c643933b0fe
$ sbt test # all works fine
// remove tmp variable /src/main/scala/wisp/reader.scala:L64
$ sbt test # watch it asplode

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions