compiler: add tests for native wrappers
This commit is contained in:
parent
73a75cc27a
commit
6cf40749a9
2 changed files with 208 additions and 1 deletions
|
@ -287,9 +287,14 @@ func isNativeHelpersPath(s string) bool {
|
|||
|
||||
// canConvert returns true if type doesn't need to be converted on type assertion.
|
||||
func canConvert(s string) bool {
|
||||
if len(s) != 0 && s[0] == '*' {
|
||||
s = s[1:]
|
||||
}
|
||||
if isInteropPath(s) {
|
||||
s = s[len(interopPrefix):]
|
||||
return s != "/iterator.Iterator" && s != "/storage.Context"
|
||||
return s != "/iterator.Iterator" && s != "/storage.Context" &&
|
||||
s != "/native/ledger.Block" && s != "/native/ledger.Transaction" &&
|
||||
s != "/native/management.Contract"
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue