Skip to content

Commit 12a405b

Browse files
committed
cmd/compile: do not set type for OPACK
That's an invalid operation and depend on gc.hidePanic to report error. Updates #43311 Change-Id: I78d615c40ab1e7887f612491e215c1c2bb758ef6 Reviewed-on: https://go-review.googlesource.com/c/go/+/294031 Trust: Cuong Manh Le <[email protected]> Run-TryBot: Cuong Manh Le <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Matthew Dempsky <[email protected]>
1 parent b7f4307 commit 12a405b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cmd/compile/internal/typecheck/typecheck.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ func typecheck1(n ir.Node, top int) ir.Node {
528528
case ir.OPACK:
529529
n := n.(*ir.PkgName)
530530
base.Errorf("use of package %v without selector", n.Sym())
531-
n.SetType(nil)
531+
n.SetDiag(true)
532532
return n
533533

534534
// types (ODEREF is with exprs)

0 commit comments

Comments
 (0)