Skip to content

NPE when a value class is assigned to a val inside async block #83

Closed
@ewiner

Description

@ewiner

It appears that if you use a value class inside an async block, the async macro will throw a NullPointerException while it's trying to initialize the state machine. When I run this code:

class IntWrapper(val value: String) extends AnyVal

async {
  val uid = new IntWrapper("foo")
  await(Future(uid))
}

I get this error:

java.lang.NullPointerException
    at #worksheet#.stateMachine$macro$1$1.<init>(TestCase.sc1225847898409493360.tmp:11)
    at #worksheet#.#worksheet#(TestCase.sc1225847898409493360.tmp:9)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions