Skip to content

Commit

Permalink
chore: clarifying panic message (gnolang#2051)
Browse files Browse the repository at this point in the history
It should not happen but it did πŸ˜† . This makes it easier to understand
why.
<!-- please provide a detailed description of the changes made in this
pull request. -->

<details><summary>Contributors' checklist...</summary>

- [x] Added new tests, or not needed, or not feasible
- [x] Provided an example (e.g. screenshot) to aid review or the PR is
self-explanatory
- [x] Updated the official documentation or not needed
- [x] No breaking changes were made, or a `BREAKING CHANGE: xxx` message
was included in the description
- [x] Added references to related issues and PRs
- [x] Provided any useful hints for running manual tests
- [x] Added new benchmarks to [generated
graphs](https://gnoland.github.io/benchmarks), if any. More info
[here](https://github.com/gnolang/gno/blob/master/.benchmarks/README.md).
</details>
  • Loading branch information
deelawn committed May 7, 2024
1 parent 1a2a879 commit 4db2f7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gnovm/pkg/gnolang/op_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ func (m *Machine) doOpStaticTypeOf() {
} else if _, ok := xt.(*TypeType); ok {
m.PushValue(asValue(gTypeType))
} else {
panic("should not happen")
panic("unexpected star expression")
}
case *RefExpr:
start := m.NumValues
Expand Down

0 comments on commit 4db2f7b

Please sign in to comment.