From 79b470acee9aa558b8e694047a175856a13d0448 Mon Sep 17 00:00:00 2001 From: Ayke van Laethem Date: Wed, 7 Aug 2019 18:33:32 +0200 Subject: [PATCH] compiler: make goroutine lowering panic message more helpful This is a workaround for an existing issue, to see which function is to blame. --- compiler/goroutine-lowering.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/goroutine-lowering.go b/compiler/goroutine-lowering.go index a336a3dd..db04b5fd 100644 --- a/compiler/goroutine-lowering.go +++ b/compiler/goroutine-lowering.go @@ -403,7 +403,7 @@ func (c *Compiler) markAsyncFunctions() (needsScheduler bool, err error) { parentHandle = f.LastParam() if parentHandle.IsNil() || parentHandle.Name() != "parentHandle" { // sanity check - panic("trying to make exported function async") + panic("trying to make exported function async: " + f.Name()) } }