build: load package in LoadAllSyntax mode (#63)

Fixes #62
This commit is contained in:
Michael McLoughlin
2019-02-20 21:17:28 +00:00
committed by GitHub
parent 9eb409b935
commit 3cfe40e76c
5 changed files with 36 additions and 1 deletions

View File

@@ -0,0 +1,14 @@
// +build ignore
package main
import (
. "github.com/mmcloughlin/avo/build"
)
func main() {
Package("github.com/mmcloughlin/avo/tests/fixedbugs/issue62")
Implement("private")
RET()
Generate()
}

View File

@@ -0,0 +1,5 @@
// Code generated by command: go run asm.go -out issue62.s. DO NOT EDIT.
// func private()
TEXT ·private(SB), $0
RET

View File

@@ -0,0 +1,11 @@
package issue62
import (
"testing"
)
//go:generate go run asm.go -out issue62.s
func TestPrivate(t *testing.T) {
private()
}

View File

@@ -0,0 +1,5 @@
// Package issue62 tests for using Implement() with an unexported function.
package issue62
// private serves as an example unexported function to implement.
func private()