www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 21849] New: UTF8: Column numbers don't respect multi-column

https://issues.dlang.org/show_bug.cgi?id=21849

          Issue ID: 21849
           Summary: UTF8: Column numbers don't respect multi-column
                    characters
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: ibuclaw gdcproject.org

For instance:
---
void main()
{
    string straße = 42;
}
---

Will report the wrong column number in the conversion error.
---
utf8error.d(3,22): Error: cannot implicitly convert expression 42 of type int
to string
    string straße = 42;
                     ^
---

The diagnostic should instead be:
---
utf8error.d(3,21): Error: cannot implicitly convert expression 42 of type int
to string
    string straße = 42;
                    ^
---

--
Apr 22 2021