Closed crai0 closed 12 months ago
@crai0 Thank you for the report and test case! I'll work on a fix.
The compiler should automatically assume that self is of type Test
.
Indeed! Also, given that the generic code of the function Test.new<T>(value: T): Test<T>
declaration translates to function Test.new(value)
— in other words, since it is not really possible to declare multiple implementations of a record function for different type variables — I think the type variable <T>
in Test.new<T>
should be made implicit as well.
@crai0 testing/feedback is most welcome for PR #669!
It's not possible to use methods with generic records:
Code:
Output:
The compiler should automatically assume that self is of type
Test<T>
.