xgo-dev / xgo-dev/llgo

GOROOT errorcheck rejects quoted field diagnostic in issue24339

Open Beginner friendly
#2,415 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
LLVM
Stars
758
Forks
49
Avg merge
1d 6h
Merged PRs (30d)
138

Description

On current xgo-dev/llgo main (6fe8babd4) with Go 1.26.5, the coverage runner fails GOROOT/test/fixedbugs/issue24339.go:

issue24339.go:20: no match for "unknown field foo"
unmatched errors:
issue24339.go:20: unknown field 'foo' in struct literal of type struct{}

The upstream ERROR regexp intentionally uses the unquoted spelling. matchesExpectedDiagnostic first tests the exact message, so a narrow fallback that removes quotes only around valid Go identifiers would accept both gc/go-types spellings without weakening patterns that explicitly require quotes.

Minimal runner selection:

go test -v ./test/goroot -run ^TestGoRootRunCases$ -count=1 -args \
  -goroot "$(go env GOROOT)" -directive-mode coverage \
  -case '^fixedbugs/issue24339\.go$'

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at matchesExpectedDiagnostic in the GoRoot test runner and inspect how it compares the expected ERROR regexp with the diagnostic text. Run the supplied TestGoRootRunCases command for fixedbugs/issue24339.go, then verify that both quoted and unquoted identifier spellings are accepted without changing patterns that explicitly require quotes.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
compilers, testing
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
84/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.