compiler: make goroutine lowering panic message more helpful

This is a workaround for an existing issue, to see which function is to
blame.
This commit is contained in:
Ayke van Laethem
2019-08-07 18:33:32 +02:00
committed by Ron Evans
parent 0b7047cc0e
commit 79b470acee
+1 -1
View File
@@ -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())
}
}