Skip to content

[SR-12605] #sourceLocation doesn't allow underscores in line numbers #55049

@beccadax

Description

@beccadax
Previous ID SR-12605
Radar rdar://problem/62202395
Original Reporter @beccadax
Type Bug
Environment

Near-master, 15 April 2019

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, Parser, StarterBug
Assignee matthewspear (JIRA)
Priority Medium

md5: 41076a6957823a7ff8a7fce6be55225d

Issue Description:

  1> #sourceLocation(file: "a.swift", line: 1_000)
error: /var/folders/mw/1rhv6fn96gb8swwkt8zycwph0000gn/T/repl1-101710..swift:2:40: error: expected starting line number for #sourceLocation directive
#sourceLocation(file: "a.swift", line: 1_000)
                                       ^
  1> #sourceLocation(file: "a.swift", line: 1000)
  2> 1_000
$R0: Int = 1000
  3>  

Underscore separators in #sourceLocation directives probably ought to be supported.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfgood first issueGood for newcomersparserArea → compiler: The legacy C++ parser

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions