Open notJoon opened 2 weeks ago
Attention: Patch coverage is 78.12500%
with 14 lines
in your changes missing coverage. Please review.
Project coverage is 54.66%. Comparing base (
edb321f
) to head (8cd96f3
). Report is 24 commits behind head on master.
Files | Patch % | Lines |
---|---|---|
misc/genstd/mapping.go | 78.12% | 7 Missing and 7 partials :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Description
Enhances the code generation functionality to support all valid types for function parameters and return values that will be injected to gno.
Changes
Modifies the
typesEqual
function to handle the following additional types:ast.MapType
: Recursively compare the key and value types of maps.ast.InterfaceType
: Iterate over the methods of an interface and compare their names and type. The detailed method comparision will be automatically checked in theast.FuncType
handler below.ast.StructType
: Iterate over the fileds of a struct and compare their field names and types.ast.FuncType
: Compare the parameter and result lists of functions. In this case, parameter names and named return identifiers are ignored, and only the type is checked for a one-to-one match.ast.Ellipsis
: Recursively compare the element type of ellipsis. This type is only valid when using as a parameter and cannot be return type.ast.SelectorExpr
: Compare the package path (also, consider alias) and name of selectors.part of #2317