Skip to content

Completion should automatically add backquotes around names that conflict with keywords #4406

Closed
@Glavo

Description

@Glavo
scala> object O {
         val `def` = 10
       } 
// defined object O
scala> O.d 
def
scala> O.def 
1 |O.def
  |  ^^^
  |  an identifier expected, but 'def' found
scala> scala.pa 
package
scala> scala.package 
1 |scala.package
  |      ^^^^^^^
  |      an identifier expected, but 'package' found
scala> 

image
image

Sometimes we will encounter names that conflict with keywords. When we complete such names, I think we should automatically add `` prevent conflicts for these names.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions