diff --git a/cl/expr.go b/cl/expr.go index c970fb706..6aa0a865e 100644 --- a/cl/expr.go +++ b/cl/expr.go @@ -120,11 +120,6 @@ func compileIdent(ctx *blockCtx, ident *ast.Ident, flags int) (pkg gox.PkgRef, k goto find } - // function alias - if compileFuncAlias(ctx, scope, ident, flags) { - return - } - // pkgRef object if (flags & clIdentSelectorExpr) != 0 { if name == "C" && len(ctx.clookups) > 0 { @@ -139,6 +134,11 @@ func compileIdent(ctx *blockCtx, ident *ast.Ident, flags int) (pkg gox.PkgRef, k } } + // function alias + if compileFuncAlias(ctx, scope, ident, flags) { + return + } + // object from import . "xxx" if compilePkgRef(ctx, gox.PkgRef{}, ident, flags, objPkgRef) { return diff --git a/testdata/__gop-sample/go.mod b/testdata/__gop-sample/go.mod deleted file mode 100644 index 73330159c..000000000 --- a/testdata/__gop-sample/go.mod +++ /dev/null @@ -1,5 +0,0 @@ -module gop-sample - -go 1.21.5 - -toolchain go1.21.6 diff --git a/testdata/__gop-sample/a.gop b/testdata/gop-sample/a.gop similarity index 100% rename from testdata/__gop-sample/a.gop rename to testdata/gop-sample/a.gop diff --git a/testdata/__gop-sample/b.gop b/testdata/gop-sample/b.gop similarity index 100% rename from testdata/__gop-sample/b.gop rename to testdata/gop-sample/b.gop diff --git a/testdata/__gop-sample/cpkag/b/ab.gop b/testdata/gop-sample/cpkag/b/ab.gop similarity index 100% rename from testdata/__gop-sample/cpkag/b/ab.gop rename to testdata/gop-sample/cpkag/b/ab.gop diff --git a/testdata/__gop-sample/gop.mod b/testdata/gop-sample/go.mod similarity index 52% rename from testdata/__gop-sample/gop.mod rename to testdata/gop-sample/go.mod index 1b1598e6a..c0f1743dd 100644 --- a/testdata/__gop-sample/gop.mod +++ b/testdata/gop-sample/go.mod @@ -1,5 +1,3 @@ module gop-sample -go 1.21 - -gop 1.1 +go 1.18 diff --git a/testdata/__gop-sample/go.sum b/testdata/gop-sample/go.sum similarity index 100% rename from testdata/__gop-sample/go.sum rename to testdata/gop-sample/go.sum