motion
motion copied to clipboard
Panics for functions without body closures
This panics:
package main
func foo(bar string)
func main() {}
This is valid AST, but not valid go program. Can easily happen during refactor or if we write new code.
A function declaration without a body is valid Go. Such a declaration provides the signature for a function implemented outside Go, such as an assembly routine.
Oh, that's indeed totally true! Thanks for the reminder @claudia-jones. In any case, we need to fix this.