mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-03 23:02:27 +00:00
compiler: support basic inlining
This commit is contained in:
parent
1f238ce6fd
commit
1ae0d022dd
9 changed files with 258 additions and 4 deletions
|
@ -8,6 +8,11 @@ import (
|
|||
)
|
||||
|
||||
func (c *codegen) typeAndValueOf(e ast.Expr) types.TypeAndValue {
|
||||
for i := len(c.pkgInfoInline) - 1; i >= 0; i-- {
|
||||
if tv, ok := c.pkgInfoInline[i].Types[e]; ok {
|
||||
return tv
|
||||
}
|
||||
}
|
||||
return c.typeInfo.Types[e]
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue