Skip to content

Type quotes and a splice is incorrectly typed causing runtime error #6530

Closed
@mpickering

Description

@mpickering

Consider the simple file A.scala.

object Macros {
   inline def q : Int = ${ '[ Int ] }
   val x : Int = 1 + q
}

Running dotc A.scala causes a runtime failure.

The program is bogus because splicing a type does not yield a value of that type. The splice should instead result in a type.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions