Ian Lance Taylor
5a5b14a4b3
go/go2go: support type inference
...
We can now translate code that use type inference when calling generic
functions. A couple of test cases were adjusted to use it.
Change-Id: I53c2f3dd8f9fcdb44b4a8f592acee1a19ff46f22
2020-06-13 12:24:46 -07:00
Ian Lance Taylor
2eed31c177
go/go2go, cmd/go2go: build a GOPATH of translated packages
...
Also start a testsuite for cmd/go2go.
Change-Id: Ib693c79b3a7427ac2f6be3264469274157a39851
2020-06-13 12:24:45 -07:00
Ian Lance Taylor
1bf660ee7c
go/go2go: initial support for contracts
...
Includes a small patch to go/types to correctly check whether type
parameters are comparable.
Change-Id: Icd3443e0cd968eabdbd55f90520b0c6ad485edf8
2020-06-13 12:24:45 -07:00
Ian Lance Taylor
fe586a7418
go/go2go, cmd/go2go: support importing Go2 packages
...
This support works for the top level test directory, but needs more
testing of "go tool go2go".
Change-Id: I01c4ce4a428535777b0fff1e6f8f39eee9005e04
2020-06-13 12:24:45 -07:00
Ian Lance Taylor
12a7da1eb0
go/go2go: add support for methods of parameterized types
...
Change-Id: I308eb692612cb8d6e7321c4972e90b102466b4c2
2020-06-13 12:24:44 -07:00
Ian Lance Taylor
b1322d38b6
go/go2go: support parameterized types
...
Added an accessor function to go/types:
// TParams returns the type parameters of the named type t, or nil.
func (t *Named) TParams() []*TypeName { return t.tparams }
Change-Id: Ife2322c73dd6eaecaed42655a57a37541661d1ed
2020-06-13 12:24:44 -07:00
Ian Lance Taylor
a480c1b795
go/go2go, go/types: support recursive instantiation
...
Permit a generic function to call a generic function.
Change-Id: Ic41b87eb4effd0d5eb9a6a209c98354b306d5449
2020-06-13 12:24:44 -07:00
Ian Lance Taylor
8238ad0ab5
test, go/go2go: support .go2 files in test directory
...
Add an initial test.
Change-Id: If1bd6922eebf6881d3ac5d93731078fb9ca7b032
2020-06-13 12:24:44 -07:00