it would work if it would be a function called later.
Not the rawin() is your issue, but the very fact the keyword "extends" calls _inherited on the base class RIGHT BEFORE the new members and methods are added.
Additionally (or rather consequently) that very moment, this is of type "class Test" and not of type "class SubTest"
Code:
class Test
{
function test()
{
if (this.rawin("fn"))
print("found");
else
print("not found");
}
}
class SubTest extends Test
{
function fn()
{
}
}
local x=SubTest() ;
x.test() ; //expected result