I'm trying to use access masks to expose a member function to only 1 type of module like this:
asIScriptEngine* pEngine = ...;
asDWORD uiAccessMask = pEngine->SetDefaultAccessMask( 2 );
pEngine->RegisterObjectMethod( "Entity", "int Get()", asMETHOD( Entity, Get ), asCALL_THISCALL );
pEngine->SetDefaultAccessMask( uiAccessMask );
The module being compiled has an access mask of 5, which is 1 (global access) and 4 (stuff specific to this module) , while the method uses an access mask of 2 (stuff specific to another module)
Yet, when i try to use the method in a module with an access mask of 5, it still compiles just fine.
This script compiles without errors:
void test(Entity@ ent)
{
ent.Get();
}
According to this, i can use access masks on individual methods.
I dug through the compiler source code, and i didn't see any code that checks the access mask. Am i doing something wrong, or is this a bug?
Example program that shows the bug is included.