From 87db6d6dfdd652eb88e5fd09f14af048de1371a9 Mon Sep 17 00:00:00 2001 From: belliash Date: Sun, 18 Nov 2018 22:06:40 +0100 Subject: [PATCH] Allow a method/closure to take compatible mixed variable as argument. --- engine/vm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/vm.c b/engine/vm.c index 6f75ed4..a643eeb 100644 --- a/engine/vm.c +++ b/engine/vm.c @@ -5027,7 +5027,7 @@ static sxi32 VmByteCodeExec( } } } - } else if((aFormalArg[n].nType & MEMOBJ_MIXED) == 0 && pArg->iFlags != aFormalArg[n].nType) { + } else if((aFormalArg[n].nType & MEMOBJ_MIXED) == 0 && (pArg->iFlags & aFormalArg[n].nType) == 0) { if(aFormalArg[n].nType == MEMOBJ_REAL && (pArg->iFlags & MEMOBJ_INT)) { /* Silently typecast integer value to float */ ProcMemObjCast xCast = PH7_MemObjCastMethod(aFormalArg[n].nType);