new object creation interface

This commit is contained in:
IlyaShurupov 2024-03-25 10:25:25 +03:00
parent c737f41d8a
commit e937d189df
23 changed files with 103 additions and 84 deletions

View file

@ -18,7 +18,7 @@ SUITE(Compiler) {
{
// no errors
auto method = objects_api::cast<MethodObject>(NDO->create("method"));
auto method = objects_api::create<MethodObject>();
method->mScript->mReadable->val = "print 1 * 20 + 10;";
method->compile();
@ -30,7 +30,7 @@ SUITE(Compiler) {
{
// with errors
auto method = objects_api::cast<MethodObject>(NDO->create("method"));
auto method = objects_api::create<MethodObject>();
method->mScript->mReadable->val = "print undefinedVariable;";
method->compile();