mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-10 05:53:39 +00:00
compiler: fix type names for generic named structs
Without this change, the compiler would probably have worked just fine but the generated types would look odd. You can see in the test case that it now doesn't use `main.Point` but rather the correct `main.Poin[float32]` etc.
This commit is contained in:
committed by
Ron Evans
parent
5078ce382d
commit
70c52ef1b4
Vendored
+3
@@ -18,4 +18,7 @@ func Add[T Coord](a, b Point[T]) Point[T] {
|
||||
func main() {
|
||||
var af, bf Point[float32]
|
||||
Add(af, bf)
|
||||
|
||||
var ai, bi Point[int]
|
||||
Add(ai, bi)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user