mirror of https://github.com/golang/go.git
go/types: some prep work for making `import "chans"` (testdata/map.go2) work
To make the import work, the import needs to be changed into `import "./chan"`, the file testdata/chans.go2 needs to be copies into a new directory testdata/chan and the file must be renamed to chans.go. But this exposes some problem with instantiating parameterized types with other type parameters. Delaying this for now. Change-Id: I1cd784fb89c2374131f3b1105493492eb0189abc
This commit is contained in:
parent
fbff5cc915
commit
e73de77f33
|
|
@ -275,7 +275,9 @@ func checkFiles(t *testing.T, testfiles []string) {
|
|||
conf.FakeImportC = true
|
||||
}
|
||||
conf.Trace = testing.Verbose()
|
||||
conf.Importer = importer.Default()
|
||||
// We don't use importer.Default() below so we can eventually
|
||||
// get testdata/map.go2 to import chans (still to be fixed).
|
||||
conf.Importer = importer.ForCompiler(fset, "source", nil)
|
||||
conf.Error = func(err error) {
|
||||
if *haltOnError {
|
||||
defer panic(err)
|
||||
|
|
|
|||
|
|
@ -89,8 +89,8 @@ func (m *Map(K, V)) InOrder() *Iterator(K, V) {
|
|||
f(m.root)
|
||||
sender.Close()
|
||||
}()
|
||||
// TODO(gri) The design doc doensn't require that we repeat the
|
||||
// type parameters here. Fix the implementation.
|
||||
// TODO(gri) The design draft doesn't require that we repeat
|
||||
// the type parameters here. Fix the implementation.
|
||||
return &Iterator(K, V){receiver}
|
||||
// return &Iterator{receiver}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue