Supporting void function return type
This commit is contained in:
@ -185,7 +185,7 @@ export default function get_ir(parsed: Parsed): IR {
|
||||
if (!depends.some((a) => a === fnc.return_type))
|
||||
depends.push(fnc.return_type);
|
||||
} else {
|
||||
if (builtin.indexOf(fnc.return_type) < 0) {
|
||||
if (fnc.return_type !== "void" && builtin.indexOf(fnc.return_type) < 0) {
|
||||
throw new IRError(
|
||||
fnc,
|
||||
`Type ${fnc.return_type} is not defined`
|
||||
|
Reference in New Issue
Block a user