mirror of
https://github.com/CPunch/Cosmo.git
synced 2026-02-02 17:10:04 +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