Skip to content

JLine 3: errors during tokenization are mishandled (in multiple ways) #706

@Jasper-M

Description

@Jasper-M

2.13.1

scala> import scala.language.experimental.macros
import scala.language.experimental.macros

scala> import scala.reflect.macros.blackbox.Context
import scala.reflect.macros.blackbox.Context

scala> def fooMacro(c: Context): c.Tree = {import c.universe._; q"42"}
fooMacro: (c: scala.reflect.macros.whitebox.Context)c.Tree

scala> def foo: Int = macro fooMacro
defined term macro foo: Int

scala> foo
res3: Int = 42

2.13.2-bin-8ee21e7

scala> def foo: Int = macro fooMacro
                            ^
       error: macro implementation reference has wrong shape. required:
       macro [<static object>].<method name>[[<type args>]] or
       macro [<macro bundle>].<method name>[[<type args>]]
       note: macro definition is not supported in the REPL when using -Yrepl-classbased.

2.13.2-bin-bc1cad4

scala> def foo: Int = macro fooMacro                      ^
       error: macro is now a reserved word; usage as an identifier is disallowed

Metadata

Metadata

Assignees

Labels

blockert:replJLine 3 upgrade (scala/scala#8036)

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions