fix compiler crash when attempting to call a non-function

This commit is contained in:
Irmen de Jong 2021-12-11 13:20:13 +01:00
parent 35998142fe
commit 02010170ce
3 changed files with 4 additions and 4 deletions

View File

@ -1 +1 @@
7.5
7.6-dev

View File

@ -154,7 +154,7 @@ internal class AstIdentifiersChecker(private val errors: IErrorReporter,
}
}
null -> {}
else -> throw FatalAstException("weird call target")
else -> errors.err("cannot call this as a subroutine or function", call.target.position)
}
}
}

View File

@ -4,8 +4,8 @@
main {
sub start() {
ubyte @shared xx = @(cx16.r5)
xx++
uword foobar
foobar()
}
}