8000 Dfmt(version 0.15.0 from Arch) seems to be eating characters. · Issue #583 · dlang-community/dfmt · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Dfmt(version 0.15.0 from Arch) seems to be eating characters. #583
Closed
@ghost

Description

I am very sorry if this is already a known issue, I am using version 0.15.0 from the Arch Linux repositories.

Using a file like

import document;

void doit(string file_name)
{
    Document[] t = read_jsonl(file_name);

}

int main(string[] args)
{
    if (args.length > 2)
    {
        return 1;
    }
    doit(args[1]);

    return 0;
}

I am getting output like:

03:28:31 alex@Comp src ±|main ✗|→ dfmt main.d
main.d(13:15)[error]: Expected `;` instead of `1`
import ocument;

void doit(string file_name)
{
    Document[] t = read_jsonl(file_name);

}

int main(string[] args)
{
    if (args.length > 2)
    {
        eturn 1;
    }
    doit(args[1]);

    return 0;
}

Which is missing the d in document and r in return.

03:29:09 alex@Comp src ±|main ✗|→ dfmt --version
v0.15.0

This is cut down quite a bit from the original version that triggered the bug, but still compiles fine using ldc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0