dlang-community / D-Scanner

Swiss-army knife for D source code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error on => shortened method syntax

ntrel opened this issue · comments

Phobos buildkite fails if I use shortened method syntax (in a struct) (from dlang/phobos#8623):

    @trusted fp() return scope => cast(_iobuf*) fps;

(Snipped warnings)

generated/dscanner-308bdfd1c18c435c94b712f3c941d787884ef1f3/dsc --config .dscanner.ini -I ../dmd/druntime/src/ --styleCheck etc std -I.
std/stdio.d(5475:32)[error]: Expected `{` instead of `=>`
std/stdio.d(5475:52)[error]: no identifier for declarator

which dscanner version are you on? Should work with current beta pre-release

It looks like Phobos buildkite is using this commit from 2021:

git clone https://github.com/dlang-community/Dscanner generated/dscanner-308bdfd1c18c435c94b712f3c941d787884ef1f3
Cloning into 'generated/dscanner-308bdfd1c18c435c94b712f3c941d787884ef1f3'...

308bdfd

I also built dscanner from git and it seems there's no error, so feel free to close. Any idea how to get Phobos buildkite updated to the fixed version?

I think the latest stable is still old, so I will keep this open until we have a new stable release