gc: record full package paths in runtime type data

detect compilation of special package runtime with
compiler flag instead of package name.

R=ken2
CC=golang-dev
https://golang.org/cl/193080
This commit is contained in:
Russ Cox 2010-01-24 23:33:59 -08:00
parent d1b14a6fb0
commit 1cecac8134
7 changed files with 67 additions and 11 deletions

View file

@ -5,6 +5,7 @@
package reflect_test
import (
"container/vector"
"io"
"os"
. "reflect"
@ -1188,3 +1189,9 @@ func TestFieldByName(t *testing.T) {
}
}
}
func TestImportPath(t *testing.T) {
if path := Typeof(vector.Vector{}).PkgPath(); path != "container/vector" {
t.Errorf("Typeof(vector.Vector{}).PkgPath() = %q, want \"container/vector\"", path)
}
}