fix '$ / x' waiting refactor of operations 16/15916/2
Antoine ELIAS [Thu, 5 Feb 2015 13:56:00 +0000 (14:56 +0100)]
Change-Id: Iddcf3f19946cbd9af956b4c7af6cbd4cb79c7b56

scilab/modules/ast/src/cpp/operations/types_divide.cpp

index 8a6909e..4f46d64 100644 (file)
@@ -59,7 +59,8 @@ InternalType *GenericRDivide(InternalType *_pLeftOperand, InternalType *_pRightO
     /*
     ** POLY / DOUBLE
     */
-    else if (TypeL == GenericType::ScilabPolynom && TypeR == GenericType::ScilabDouble)
+    else if ((TypeL == GenericType::ScilabDollar || TypeL == GenericType::ScilabPolynom )
+             && TypeR == GenericType::ScilabDouble)
     {
         Polynom *pL = _pLeftOperand->getAs<types::Polynom>();
         Double *pR  = _pRightOperand->getAs<Double>();
@@ -70,7 +71,8 @@ InternalType *GenericRDivide(InternalType *_pLeftOperand, InternalType *_pRightO
     /*
     ** DOUBLE / POLY
     */
-    else if (TypeL == GenericType::ScilabDouble && TypeR == GenericType::ScilabPolynom)
+    else if (TypeL == GenericType::ScilabDouble
+             && (TypeR == GenericType::ScilabDollar || TypeR == GenericType::ScilabPolynom))
     {
         Double *pL  = _pLeftOperand->getAs<Double>();
         Polynom *pR = _pRightOperand->getAs<types::Polynom>();