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

avoid panic when embedding a builtin alias #806

Merged
merged 1 commit into from
Nov 15, 2023

Conversation

mvdan
Copy link
Member

@mvdan mvdan commented Nov 14, 2023

(see commit message)

Fixes #798.

TypeName.Pkg is documented as:

    Pkg returns the package to which the object belongs.
    The result is nil for labels and objects in the Universe scope.

When a struct type embeds a builtin alias type, such as byte,
this would lead to a panic since we assumed we could use the Pkg method.

Fixes burrowers#798.
@lu4p lu4p merged commit 4271bc4 into burrowers:master Nov 15, 2023
5 checks passed
@mvdan mvdan deleted the alias-builtin branch November 17, 2023 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

nil pointer dereference panic when computing aliasTypeName
2 participants