Currently, no mechanism yet to get generics of declarations.
How to Reproduce
A small example:
class MyClass[T]
def f(x: T) -> T => x
def x := MyClass[Int]()
Gives an error when trying to process the following in check stage:
def x := MyClass[Int]()
During the generate stage, it correctly identifies this as a function call.
However, the function name is a StringName, and this causes a problem because we call (pseudocode ahead) StringName::try_from(MyClass[Int]).
Because StringName does not know how to deal with Node:Index (which is how it is parsed).
Expected behavior
Should be converted to a StringName.
This should be a quick fix in TryFrom<&AST> for StringName.
Once implemented, then the internal generic logic of check stage which we implemented recently (in part to get collections to work) should take over.
Description of Bug
Currently, no mechanism yet to get generics of declarations.
How to Reproduce
A small example:
Gives an error when trying to process the following in check stage:
During the generate stage, it correctly identifies this as a function call. However, the function name is a
StringName
, and this causes a problem because we call (pseudocode ahead)StringName::try_from(MyClass[Int])
. BecauseStringName
does not know how to deal withNode:Index
(which is how it is parsed).Expected behavior
Should be converted to a
StringName
. This should be a quick fix inTryFrom<&AST>
forStringName
.Once implemented, then the internal generic logic of check stage which we implemented recently (in part to get collections to work) should take over.