Commit 05416684 authored by Rebecca Stambler's avatar Rebecca Stambler Committed by Ian Lance Taylor
Browse files

[release-branch.go1.11] go/types: handle nil pointer when panic is written outside of a function

The current implementation crashes when someone writes a panic outside of
a function, which makes sense since that is broken code. This fix allows
one to type-check broken code.

Fixes #27497

Change-Id: I81b90dbd918162a20c60a821340898eaf02e648d
Reviewed-on: https://go-review.googlesource.com/132235


Reviewed-by: default avatarAlan Donovan <adonovan@google.com>
(cherry picked from commit c99687f8)
Reviewed-on: https://go-review.googlesource.com/133395


Reviewed-by: default avatarRobert Griesemer <gri@golang.org>
parent 5a25f45b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment