Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/compile/internal/types2: don't crash if import path is missing #43190

Closed
griesemer opened this issue Dec 15, 2020 · 1 comment
Closed

cmd/compile/internal/types2: don't crash if import path is missing #43190

griesemer opened this issue Dec 15, 2020 · 1 comment
Assignees
Labels
Milestone

Comments

@griesemer
Copy link
Contributor

@griesemer griesemer commented Dec 15, 2020

The program main.go:

package p
import

causes a crash for types2 with go test -run Check$ -files main.go.

The problem is that the syntax parser returns nil *syntax.ImportDecl values when the import path is missing; and those nil values are added to decl lists even though they should be ignored.

@griesemer griesemer added this to the Go1.17 milestone Dec 15, 2020
@griesemer griesemer self-assigned this Dec 15, 2020
@gopherbot
Copy link

@gopherbot gopherbot commented Dec 15, 2020

Change https://golang.org/cl/278114 mentions this issue: [dev.typeparams] cmd/compile/internal/types2: don't crash if import path is missing

Loading

@gopherbot gopherbot closed this in 6b18081 Feb 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants