Commit 509d9f9
ssa: fix prog.Type error for instantiated generic types
When converting instantiated generic types (e.g., nistCurve[*P256Point]),
the Instantiate function was using types.Instantiate with validate=true.
This caused validation to fail because:
1. cvtNamed creates new type parameters with types.NewTypeParam()
2. The constraint on these new type parameters still references the OLD
type parameter from the origin type
3. When validating, the method signatures don't match because the
constraint expects methods with the old type param (e.g., Add(Point, Point))
but the type argument has methods with concrete types (e.g., Add(*P256Point, *P256Point))
The fix is to use validate=false since the original type was already
validated by the Go type checker.
Fixes #1636
Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: visualfc <714279+visualfc@users.noreply.github.com>1 parent 9c8b6b3 commit 509d9f9
1 file changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
173 | | - | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
174 | 177 | | |
175 | 178 | | |
176 | 179 | | |
| |||
0 commit comments