mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-18 19:44:00 +00:00
cgo: fixes panic when FuncType.Results is nil (#3136)
* cgo: fixes panic when FuncType.Results is nil FuncType.Results can be nil. This fixes the comparison and backfills relevant tests. Signed-off-by: Adrian Cole <adrian@tetrate.io> Co-authored-by: Ayke <aykevanlaethem@gmail.com>
This commit is contained in:
@@ -948,6 +948,9 @@ func (p *cgoPackage) isEquivalentAST(a, b ast.Node) bool {
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
if node == nil || b == nil {
|
||||
return node == b
|
||||
}
|
||||
if len(node.List) != len(b.List) {
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user