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;
^
---
(In reply to Iain Buclaw from comment #1)
> Reason is that column tracking just uses simple pointer subtraction.
>
> https://github.com/dlang/dmd/blob/db13c6c948b4724ad8235c7063feba1241f685b4/
> src/dmd/lexer.d#L2291
>
Nope, I've changed my mind. This should be handled by the dmd.errors diagnostic routines.
The location held by Loc is correct, as it is the raw byte column number.