]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: initialize Decldepth in all cases
authorDhananjay Nakrani <dhananjaynakrani@gmail.com>
Sun, 30 Oct 2016 19:47:53 +0000 (12:47 -0700)
committerJosh Bleecher Snyder <josharian@gmail.com>
Mon, 31 Oct 2016 19:48:17 +0000 (19:48 +0000)
commitf46239b85c97ef32ef4f5c9476d77c812125b441
treea383bf6274ea240dfbc3b988211130750bccbcb0
parent741445068f7f582824f1c5625159e0b728090265
cmd/compile: initialize Decldepth in all cases

Previously, on encountering Func.Nname.Type == nil, typecheckfunc()
returned without initializing Decldepth for that func. This causes
typecheckclosure() to fatal. This change ensures that we initialize
Decldepth in all cases.

Fixes #17588.

Change-Id: I2e3c81ad52e8383395025388989e8dbf03438b68
Reviewed-on: https://go-review.googlesource.com/32415
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/compile/internal/gc/typecheck.go
test/fixedbugs/issue17588.go [new file with mode: 0644]