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

Value.Type() can return a reference to a nil pointer #2387

Closed
fxamacker opened this issue Mar 15, 2023 · 0 comments · Fixed by #2388
Closed

Value.Type() can return a reference to a nil pointer #2387

fxamacker opened this issue Mar 15, 2023 · 0 comments · Fixed by #2388
Assignees
Labels
Bug Something isn't working E&V Team Execution / Verification / Edge Team Feedback

Comments

@fxamacker
Copy link
Member

fxamacker commented Mar 15, 2023

Issue to be solved

Current implementations of Value.Type() can return a Type referencing a nil pointer.

This can make callers deference the nil pointer.

Suggested Solution

Implementations of Value.Type() should return nil instead of a reference to a nil pointer.

Change Type() to check and return nil Type, instead of Type referencing nil pointer for these external values:

  • Dictionary
  • Struct
  • Resource
  • Attachment
  • Event
  • Contract
  • Enum
  • Function
@fxamacker fxamacker self-assigned this Mar 15, 2023
@fxamacker fxamacker added Bug Something isn't working and removed Feature labels Mar 15, 2023
@j1010001 j1010001 added the E&V Team Execution / Verification / Edge Team label Mar 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working E&V Team Execution / Verification / Edge Team Feedback
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants