-
Notifications
You must be signed in to change notification settings - Fork 378
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
fix(gnovm): handle type alias declaration for PrimitiveType #3222
base: master
Are you sure you want to change the base?
fix(gnovm): handle type alias declaration for PrimitiveType #3222
Conversation
Codecov ReportAttention: Patch coverage is 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
Merge RequirementsThe following requirements must be fulfilled before a pull request can be merged. These requirements are defined in this configuration file. Automated Checks🟢 Maintainers must be able to edit this pull request Details
Manual Checks
Details
|
@@ -2352,6 +2352,8 @@ func preprocess1(store Store, ctx BlockNode, n Node) Node { | |||
// } | |||
*dst = *dt2 | |||
} | |||
case PrimitiveType: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WDYT, handle other types like PointerType, NativeType ... ?
example this:
package main
type (
Number = *int32
Number2 = Number
)
func f(n Number) { println(n) }
func main() {
var n int32 = 5
f(&n)
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's good idea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added cases for PointerType. I think all the existing handled cases + PrimitiveCase cover already Native case so it should be fine
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…type-declaration-3203
…thub.com/hthieu1110/gno into fix/mishandling-of-type-declaration-3203
Fixes: #3203
Contributors' checklist...
BREAKING CHANGE: xxx
message was included in the description