From 6ee2ed80f7f6400b7dc3f8c0c0bdb324f92852dc Mon Sep 17 00:00:00 2001 From: Stephan Hadinger Date: Fri, 8 Apr 2022 19:53:55 +0200 Subject: [PATCH] Berry supper class in member --- lib/libesp32/berry/src/be_vm.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/libesp32/berry/src/be_vm.c b/lib/libesp32/berry/src/be_vm.c index 4a01b1de5..1f6fe4586 100644 --- a/lib/libesp32/berry/src/be_vm.c +++ b/lib/libesp32/berry/src/be_vm.c @@ -875,6 +875,11 @@ newframe: /* a new call frame */ } var_setinstance(&a[1], obj); /* replace superinstance by lowest subinstance */ } + } else if (var_isclass(a)) { + /* in this case we have a class in a static or non-static member */ + /* it's always treated like a statif function */ + a[1] = result; + var_settype(a, NOT_METHOD); } else { vm_error(vm, "attribute_error", "class '%s' has no method '%s'",