mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Littlefoot: detect wrong number of arguments when compiling cast operation (#42)
This commit is contained in:
parent
ff1ba93a1b
commit
8589f38cfb
1 changed files with 3 additions and 0 deletions
|
|
@ -2062,6 +2062,9 @@ private:
|
|||
|
||||
void emitCast (CodeGenerator& cg, Type destType, int stackDepth) const
|
||||
{
|
||||
if (arguments.size() != 1)
|
||||
location.throwError (getTypeName (destType) + " cast operation requires a single argument");
|
||||
|
||||
auto* arg = arguments.getReference (0);
|
||||
const auto sourceType = arg->getType (cg);
|
||||
arg->emit (cg, sourceType, stackDepth);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue