mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-25 23:42:23 +00:00
compiler: add a panic on internal lambda inconsistency
It's a bit better than behavior observer in #2281 (which is very cryptic).
This commit is contained in:
parent
33e37e60e5
commit
cddd5e1f6d
1 changed files with 3 additions and 0 deletions
|
@ -514,6 +514,9 @@ func (c *codegen) convertFuncDecl(file ast.Node, decl *ast.FuncDecl, pkg *types.
|
|||
|
||||
if !isLambda {
|
||||
for _, f := range c.lambda {
|
||||
if _, ok := c.lambda[c.getIdentName("", f.decl.Name.Name)]; !ok {
|
||||
panic("ICE: lambda name doesn't match map key")
|
||||
}
|
||||
c.convertFuncDecl(file, f.decl, pkg)
|
||||
}
|
||||
c.lambda = make(map[string]*funcScope)
|
||||
|
|
Loading…
Reference in a new issue