ravi icon indicating copy to clipboard operation
ravi copied to clipboard

Enable additional type assertions

Open dibyendumajumdar opened this issue 7 years ago • 0 comments

Note: this is experimental

Add userdata type assertions. For instance:

function x(a: MyType) end

Should cause an assertion that a is userdata type of MyType

function x(a) local t = @MyType( a ) end

Should also assert that a is userdata type of MyType

Additionally enable 'string' and 'closure' type assertions. And allow 'any' as noop.

There will not be any impact on JIT code gen except for the additional type assertions. It is not yet clear we can enforce: local a: MyType

dibyendumajumdar avatar Oct 14 '17 00:10 dibyendumajumdar