Commit 2c6a8892 authored by Keith Randall's avatar Keith Randall Committed by Dmitri Shuralyov
Browse files

[release-branch.go1.18] cmd/compile: fix expression switches using type parameters

Both the thing we're switching on, as well as the cases we're switching for.
Convert anything containing a type parameter to interface{} before the
comparison happens.

Fixes #51522

Change-Id: I97ba9429ed332cb7d4240cb60f46d42226dcfa5f
Reviewed-on: https://go-review.googlesource.com/c/go/+/391594


Trust: Keith Randall <khr@golang.org>
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
Reviewed-by: default avatarMatthew Dempsky <mdempsky@google.com>
(cherry picked from commit 2e46a0a9)
Reviewed-on: https://go-review.googlesource.com/c/go/+/391795


Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: default avatarKeith Randall <khr@golang.org>
parent 1edc1ccf
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment