AST: inserting an empty matrix does not remove the field 11/18011/1
Paul Bignier [Wed, 30 Mar 2016 13:04:23 +0000 (15:04 +0200)]
 * UserType was treated as GenericType

Change-Id: Ic8ce29e88b631105be58e3134a65ce4d5a5ec5ba

scilab/modules/ast/src/cpp/ast/visitor_common.cpp

index 864850c..76de2d4 100644 (file)
@@ -1796,6 +1796,10 @@ types::InternalType* insertionCall(const ast::Exp& e, types::typed_list* _pArgs,
         {
             pOut = _pVar->getAs<types::Struct>()->insert(_pArgs, _pInsert);
         }
+        else if (_pVar->isUserType())
+        {
+            pOut = _pVar->getAs<types::UserType>()->insert(_pArgs, _pInsert);
+        }
         else if (_pInsert->isGenericType() && (_pInsert->isTList() == false &&  _pInsert->isMList() == false))
         {
             pOut = _pVar->getAs<types::GenericType>()->remove(_pArgs);