aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/typecheck/iimport.go
diff options
context:
space:
mode:
authorKeith Randall <khr@golang.org>2021-03-05 09:50:28 -0800
committerKeith Randall <khr@golang.org>2021-03-09 18:33:42 +0000
commitb6df58bd1f3b2a05787f62bbec4267f7867d4bbd (patch)
treeeb4cec56f6378b1fca569c00051e0783b3647179 /src/cmd/compile/internal/typecheck/iimport.go
parente8e425cb231863c1ed1bcf00dd5a517ceeaf6b9c (diff)
downloadgo-b6df58bd1f3b2a05787f62bbec4267f7867d4bbd.tar.gz
go-b6df58bd1f3b2a05787f62bbec4267f7867d4bbd.zip
cmd/compile: detect duplicate importing earlier
Change-Id: I05ba944e189a884b727e40a9526d212612c3e923 Reviewed-on: https://go-review.googlesource.com/c/go/+/299770 Trust: Keith Randall <khr@golang.org> Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Dan Scales <danscales@google.com>
Diffstat (limited to 'src/cmd/compile/internal/typecheck/iimport.go')
-rw-r--r--src/cmd/compile/internal/typecheck/iimport.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/typecheck/iimport.go b/src/cmd/compile/internal/typecheck/iimport.go
index d7c118b631..5c57373b66 100644
--- a/src/cmd/compile/internal/typecheck/iimport.go
+++ b/src/cmd/compile/internal/typecheck/iimport.go
@@ -63,7 +63,7 @@ func expandDecl(n ir.Node) ir.Node {
func ImportBody(fn *ir.Func) {
if fn.Inl.Body != nil {
- return
+ base.Fatalf("%v already has inline body", fn)
}
r := importReaderFor(fn.Nname.Sym(), inlineImporter)