Skip to content

VerifyError for polymorphic function from Nothing #13149

Open
@TomasMikula

Description

@TomasMikula

Compiler version

3.0.2-RC1

Minimized code

@main def Test() =

  def go[F[_]](get: [x] => F[x] => x): Unit = {}
  go[Nothing]([x] => (fx: Nothing) => fx)

Output

java.lang.VerifyError: Bad type on operand stack
Exception Details:
  Location:
    repl$/rs$line$1$$anon$1.apply(Ljava/lang/Object;)Ljava/lang/Object; @1: athrow
  Reason:
    Type 'java/lang/Object' (current frame, stack[0]) is not assignable to 'java/lang/Throwable'
  Current Frame:
    bci: @1
    flags: { }
    locals: { 'repl$/rs$line$1$$anon$1', 'java/lang/Object' }
    stack: { 'java/lang/Object' }
  Bytecode:
    0000000: 2bbf bf                                
  Stackmap Table:
    full_frame(@2,{},{Object[#191]})

  ... 28 elided

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions