You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to make teal generate custom type checking code when using the is operator instead of checking using type()?
For example, in my lua implementation, all custom types have an Is method which can be used to determine their type if needed, like this:
ifx:Is('SomeType') then-- Do something with xend
Is there a way (eg. using some annotation) to make it so the following teal code gets transpiled to the code above, when x is declared as some record userdata type?
ifxisSomeTypethen-- Do something with xend
The text was updated successfully, but these errors were encountered:
@OrfeasZ not yet, but this is something I want to implement. Something along these lines should come with the interfaces implementation, which should cover this, as well as #655 (and possibly other related feature requests).
Is it possible to make teal generate custom type checking code when using the
is
operator instead of checking usingtype()
?For example, in my lua implementation, all custom types have an
Is
method which can be used to determine their type if needed, like this:Is there a way (eg. using some annotation) to make it so the following teal code gets transpiled to the code above, when
x
is declared as some record userdata type?The text was updated successfully, but these errors were encountered: