mirror of
https://github.com/CPunch/Cosmo.git
synced 2025-12-18 17:20:58 +00:00
CObjMethod refactor
This commit is contained in:
@@ -955,7 +955,7 @@ static void functionDeclaration(CParseState *pstate) {
|
||||
}
|
||||
|
||||
static void returnStatement(CParseState *pstate) {
|
||||
if (pstate->compiler->type != FTYPE_FUNCTION) {
|
||||
if (pstate->compiler->type != FTYPE_FUNCTION && pstate->compiler->type != FTYPE_METHOD) {
|
||||
error(pstate, "Expected 'return' in function!");
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user