Feedback
Closures retain generic method type arguments
- Status
- Fixed
- Fixed in
- v26.10.3
- Area
- compiler
- Source discussion
- -
- Last updated
- 2026-10-20
Upvotes
0 upvotes
Uses your Objo forum account.
Public summary
A closure created by a generic method can lose the method's type arguments. Using TypeOf(T) or New T() in the returned inline function then raises an undefined-variable error. The closure should retain those type arguments after the creating method returns.