]> Cypherpunks repositories - gostls13.git/commit
go/types,types2: fix panic in reverse type inference when -lang<go1.18
authorRob Findley <rfindley@google.com>
Fri, 14 Apr 2023 18:25:53 +0000 (14:25 -0400)
committerRobert Findley <rfindley@google.com>
Fri, 14 Apr 2023 18:40:36 +0000 (18:40 +0000)
commit35ec948de766e7e8854b95edda3a0bb4723a63ec
treef48c7e9648586f7794dce644fa0154511ab61f86
parent7c2550b7bb284e189d9d977800baa33ebf137fea
go/types,types2: fix panic in reverse type inference when -lang<go1.18

Due to reverse type inference, we may not have an index expression when
type-checking a function instantiation. Fix a panic when the index expr
is nil.

Fixes #59639

Change-Id: Ib5de5e49cdb7b339653e4fb775bf5c5fdb3c6907
Reviewed-on: https://go-review.googlesource.com/c/go/+/484757
Reviewed-by: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Robert Findley <rfindley@google.com>
src/cmd/compile/internal/types2/call.go
src/go/types/call.go
src/internal/types/testdata/fixedbugs/issue59639.go [new file with mode: 0644]