summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSt├ęphane MOTTELET <stephane.mottelet@utc.fr>2019-04-25 14:06:10 +0200
committerAntoine ELIAS <antoine.elias@esi-group.com>2020-01-18 10:16:46 +0100
commit418a270dafc85397596b1a3a818c461614786c86 (patch)
treefe41c9e29e764390be94a60a4a5d1f702889064b
parent1963f89058a9594a5e9c0b2488e869751310a110 (diff)
downloadscilab-master.zip
scilab-master.tar.gz
* Bug #16051 fixed: now undefined list elements are of Void typeHEADmaster
http://bugzilla.scilab.org/show_bug.cgi?id=16051 Change-Id: I19016c7544f4b3bd0c748a27b736fb86eda0a419
-rw-r--r--scilab/CHANGES.md4
-rw-r--r--scilab/modules/api_scilab/src/cpp/api_stack_list.cpp12
-rw-r--r--scilab/modules/api_scilab/src/cpp/template/api_list.hpp2
-rw-r--r--scilab/modules/ast/Makefile.am2
-rw-r--r--scilab/modules/ast/Makefile.in22
-rw-r--r--scilab/modules/ast/ast.vcxproj4
-rw-r--r--scilab/modules/ast/ast.vcxproj.filters8
-rw-r--r--scilab/modules/ast/includes/types/alltypes.hxx1
-rw-r--r--scilab/modules/ast/includes/types/internal.hxx2
-rw-r--r--scilab/modules/ast/includes/types/listundefined.hxx57
-rw-r--r--scilab/modules/ast/includes/types/void.hxx2
-rw-r--r--scilab/modules/ast/src/cpp/ast/visitor_common.cpp4
-rw-r--r--scilab/modules/ast/src/cpp/types/internal.cpp8
-rw-r--r--scilab/modules/ast/src/cpp/types/list.cpp14
-rw-r--r--scilab/modules/ast/src/cpp/types/listundefined.cpp49
-rw-r--r--scilab/modules/ast/src/cpp/types/macro.cpp3
-rw-r--r--scilab/modules/ast/src/cpp/types/tlist.cpp1
-rw-r--r--scilab/modules/ast/tests/nonreg_tests/bug_16051.tst24
-rw-r--r--scilab/modules/core/sci_gateway/cpp/sci_insert.cpp4
-rw-r--r--scilab/modules/data_structures/sci_gateway/cpp/sci_getfield.cpp2
-rw-r--r--scilab/modules/hdf5/sci_gateway/cpp/sci_hdf5_load_v3.cpp3
21 files changed, 58 insertions, 170 deletions
diff --git a/scilab/CHANGES.md b/scilab/CHANGES.md
index ab5f2cd..2372012 100644
--- a/scilab/CHANGES.md
+++ b/scilab/CHANGES.md
@@ -191,8 +191,7 @@ Bug Fixes
191* [#14863](http://bugzilla.scilab.org/show_bug.cgi?id=14863): In Xcos, the default ending time was unhandily high (100000), reduced it to 30. 191* [#14863](http://bugzilla.scilab.org/show_bug.cgi?id=14863): In Xcos, the default ending time was unhandily high (100000), reduced it to 30.
192* [#14982](http://bugzilla.scilab.org/show_bug.cgi?id=14982): `msprintf` segmentation fault was caught due to wrong size 192* [#14982](http://bugzilla.scilab.org/show_bug.cgi?id=14982): `msprintf` segmentation fault was caught due to wrong size
193* [#14985](http://bugzilla.scilab.org/show_bug.cgi?id=14985): scilab crashed if a .bin file was not found. 193* [#14985](http://bugzilla.scilab.org/show_bug.cgi?id=14985): scilab crashed if a .bin file was not found.
194* [#15087](http://bugzilla.scilab.org/show_bug.cgi?id=15087): Deleting rows or columns from a matrix is slow (regression 194* [#15087](http://bugzilla.scilab.org/show_bug.cgi?id=15087): Deleting rows or columns from a matrix is slow (regression)
195)
196* [#15248](http://bugzilla.scilab.org/show_bug.cgi?id=15248): `lsq()`was leaking memory. 195* [#15248](http://bugzilla.scilab.org/show_bug.cgi?id=15248): `lsq()`was leaking memory.
197* [#15269](http://bugzilla.scilab.org/show_bug.cgi?id=15269): `xgetech` was poor and stiff compared to any combination of `gca()` properties `.axes_bounds`, `.data_bounds`, `.log_flags`, and `.margins`. It is removed. 196* [#15269](http://bugzilla.scilab.org/show_bug.cgi?id=15269): `xgetech` was poor and stiff compared to any combination of `gca()` properties `.axes_bounds`, `.data_bounds`, `.log_flags`, and `.margins`. It is removed.
198* [#15271](http://bugzilla.scilab.org/show_bug.cgi?id=15271): `bitget` needed to be upgraded. 197* [#15271](http://bugzilla.scilab.org/show_bug.cgi?id=15271): `bitget` needed to be upgraded.
@@ -224,6 +223,7 @@ Bug Fixes
224* [#16015](http://bugzilla.scilab.org/show_bug.cgi?id=116015): `intg(a,b,f)` called f(x) with x outside [a,b]. 223* [#16015](http://bugzilla.scilab.org/show_bug.cgi?id=116015): `intg(a,b,f)` called f(x) with x outside [a,b].
225* [#16021](http://bugzilla.scilab.org/show_bug.cgi?id=16021): `tand([-90 90])` answered [Nan Nan] instead of [-Inf, Inf]. `cotd([-90 90])` answered [Nan Nan] instead of [0 0]. `1 ./cosd([-90 90])` answered [Inf -Inf] instead of [Inf Inf]. 224* [#16021](http://bugzilla.scilab.org/show_bug.cgi?id=16021): `tand([-90 90])` answered [Nan Nan] instead of [-Inf, Inf]. `cotd([-90 90])` answered [Nan Nan] instead of [0 0]. `1 ./cosd([-90 90])` answered [Inf -Inf] instead of [Inf Inf].
226* [#16026](http://bugzilla.scilab.org/show_bug.cgi?id=16026): For `atanh()`, neither the documentation pages nor the `m2sci` converter were up to date. 225* [#16026](http://bugzilla.scilab.org/show_bug.cgi?id=16026): For `atanh()`, neither the documentation pages nor the `m2sci` converter were up to date.
226* [#16051](http://bugzilla.scilab.org/show_bug.cgi?id=16051): undefined list elements could be of 2 distinct typeof "void" or "listundefined" according to the way they are created.
227* [#16067](http://bugzilla.scilab.org/show_bug.cgi?id=16067): The display of matrices of signed integers was misaligned (regression of 6.0.0 vs 5.5.2) 227* [#16067](http://bugzilla.scilab.org/show_bug.cgi?id=16067): The display of matrices of signed integers was misaligned (regression of 6.0.0 vs 5.5.2)
228* [#16071](http://bugzilla.scilab.org/show_bug.cgi?id=16071): `prettyprint(complex(1,%nan))` omitted the "+" in `1 + Nani`. It printed positive exponents with a useless "+". For any input nul polynomial, the string result never included the name of the variable. Default input arguments could not be skipped. ExportFormat was uselessly case-sensitive. For tex|latex: for text input, $ \ % & { } ~ and ^ special characters were not protected ; spaces were not protected, all words were concatenated ; for polynomials and rationals, the result string could be extremely long and not easily wrappable. For MathML: "<" was not protected ; <mi></mi> were missing for text input ; <mtable>, </mtable>, <mtr>, </mtr>, <mtd>, <mfenced> and </mfenced> tags were not wrapped and could not be indented. Delimiters: "" was not documented as possible value ; ")" was wrongly documented. Dynamical linear systems were not documented as possible input. 228* [#16071](http://bugzilla.scilab.org/show_bug.cgi?id=16071): `prettyprint(complex(1,%nan))` omitted the "+" in `1 + Nani`. It printed positive exponents with a useless "+". For any input nul polynomial, the string result never included the name of the variable. Default input arguments could not be skipped. ExportFormat was uselessly case-sensitive. For tex|latex: for text input, $ \ % & { } ~ and ^ special characters were not protected ; spaces were not protected, all words were concatenated ; for polynomials and rationals, the result string could be extremely long and not easily wrappable. For MathML: "<" was not protected ; <mi></mi> were missing for text input ; <mtable>, </mtable>, <mtr>, </mtr>, <mtd>, <mfenced> and </mfenced> tags were not wrapped and could not be indented. Delimiters: "" was not documented as possible value ; ")" was wrongly documented. Dynamical linear systems were not documented as possible input.
229* [#16072](http://bugzilla.scilab.org/show_bug.cgi?id=16072): `prettyprint()` did not actually support input encoded integers. 229* [#16072](http://bugzilla.scilab.org/show_bug.cgi?id=16072): `prettyprint()` did not actually support input encoded integers.
diff --git a/scilab/modules/api_scilab/src/cpp/api_stack_list.cpp b/scilab/modules/api_scilab/src/cpp/api_stack_list.cpp
index 65c1356..b1c78f2 100644
--- a/scilab/modules/api_scilab/src/cpp/api_stack_list.cpp
+++ b/scilab/modules/api_scilab/src/cpp/api_stack_list.cpp
@@ -20,7 +20,7 @@
20#include <map> 20#include <map>
21#include <string> 21#include <string>
22#include "list.hxx" 22#include "list.hxx"
23#include "listundefined.hxx" 23#include "void.hxx"
24#include "tlist.hxx" 24#include "tlist.hxx"
25#include "mlist.hxx" 25#include "mlist.hxx"
26#include "struct.hxx" 26#include "struct.hxx"
@@ -146,7 +146,7 @@ SciErr getListItemAddress(void* _pvCtx, int* _piAddress, int _iItemNum, int** _p
146 types::List* pL = (types::List*)_piAddress; 146 types::List* pL = (types::List*)_piAddress;
147 //get offset of item array 147 //get offset of item array
148 types::InternalType* pIT = pL->get(_iItemNum - 1); 148 types::InternalType* pIT = pL->get(_iItemNum - 1);
149 if (pIT->isListUndefined()) 149 if (pIT->isVoid())
150 { 150 {
151 *_piItemAddress = NULL; 151 *_piItemAddress = NULL;
152 } 152 }
@@ -271,7 +271,7 @@ static SciErr createCommonNamedList(void* _pvCtx, const char* _pstName, int _iLi
271 *_piAddress = (int*)pL; 271 *_piAddress = (int*)pL;
272 // create a list with the user number of items 272 // create a list with the user number of items
273 // it helps to check a wrong item, for example in createCommonListInList 273 // it helps to check a wrong item, for example in createCommonListInList
274 pL->set(_iNbItem - 1, new types::ListUndefined()); 274 pL->set(_iNbItem - 1, new types::Void());
275 275
276 wchar_t* pwstName = to_wide_string(_pstName); 276 wchar_t* pwstName = to_wide_string(_pstName);
277 symbol::Context* ctx = symbol::Context::getInstance(); 277 symbol::Context* ctx = symbol::Context::getInstance();
@@ -336,7 +336,7 @@ static SciErr createCommonList(void* _pvCtx, int _iVar, int _iListType, int _iNb
336 336
337 // create a list with the user number of items 337 // create a list with the user number of items
338 // it helps to check a wrong item, for example in createCommonListInList 338 // it helps to check a wrong item, for example in createCommonListInList
339 pL->set(_iNbItem - 1, new types::ListUndefined()); 339 pL->set(_iNbItem - 1, new types::Void());
340 340
341 int rhs = _iVar - *getNbInputArgument(_pvCtx); 341 int rhs = _iVar - *getNbInputArgument(_pvCtx);
342 out[rhs - 1] = pL; 342 out[rhs - 1] = pL;
@@ -544,7 +544,7 @@ static SciErr createCommonListInList(void* _pvCtx, const char* _pstName, int* _p
544 return sciErr; 544 return sciErr;
545 } 545 }
546 // create a list in the list with a user number of items 546 // create a list in the list with a user number of items
547 pChild->set(_iNbItem - 1, new types::ListUndefined()); 547 pChild->set(_iNbItem - 1, new types::Void());
548 548
549 types::List* pParent = (types::List*)_piParent; 549 types::List* pParent = (types::List*)_piParent;
550 pParent->set(_iItemPos - 1, pChild); 550 pParent->set(_iItemPos - 1, pChild);
@@ -593,7 +593,7 @@ SciErr createUndefinedInNamedList(void* _pvCtx, const char* _pstName, int* _piPa
593 return sciErr; 593 return sciErr;
594 } 594 }
595 595
596 pL->set(_iItemPos - 1, new types::ListUndefined()); 596 pL->set(_iItemPos - 1, new types::Void());
597 return sciErr; 597 return sciErr;
598} 598}
599 599
diff --git a/scilab/modules/api_scilab/src/cpp/template/api_list.hpp b/scilab/modules/api_scilab/src/cpp/template/api_list.hpp
index c8934e0..0d5fe3c 100644
--- a/scilab/modules/api_scilab/src/cpp/template/api_list.hpp
+++ b/scilab/modules/api_scilab/src/cpp/template/api_list.hpp
@@ -38,7 +38,7 @@ int API_PROTO(isUndefined)(scilabEnv env, scilabVar var, int index)
38 } 38 }
39#endif 39#endif
40 types::InternalType* item = l->get(index); 40 types::InternalType* item = l->get(index);
41 if (item->isListUndefined()) 41 if (item->isVoid())
42 { 42 {
43 return 1; 43 return 1;
44 } 44 }
diff --git a/scilab/modules/ast/Makefile.am b/scilab/modules/ast/Makefile.am
index 59ee4ba..0e2739e 100644
--- a/scilab/modules/ast/Makefile.am
+++ b/scilab/modules/ast/Makefile.am
@@ -96,7 +96,6 @@ src/cpp/types/list.cpp \
96src/cpp/types/listdelete.cpp \ 96src/cpp/types/listdelete.cpp \
97src/cpp/types/listinsert.cpp \ 97src/cpp/types/listinsert.cpp \
98src/cpp/types/listoperation.cpp \ 98src/cpp/types/listoperation.cpp \
99src/cpp/types/listundefined.cpp \
100src/cpp/types/macro.cpp \ 99src/cpp/types/macro.cpp \
101src/cpp/types/macrofile.cpp \ 100src/cpp/types/macrofile.cpp \
102src/cpp/types/mlist.cpp \ 101src/cpp/types/mlist.cpp \
@@ -480,7 +479,6 @@ includes/types/listdelete.hxx \
480includes/types/list.hxx \ 479includes/types/list.hxx \
481includes/types/listinsert.hxx \ 480includes/types/listinsert.hxx \
482includes/types/listoperation.hxx \ 481includes/types/listoperation.hxx \
483includes/types/listundefined.hxx \
484includes/types/macrofile.hxx \ 482includes/types/macrofile.hxx \
485includes/types/macro.hxx \ 483includes/types/macro.hxx \
486includes/types/matrixiterator.hxx \ 484includes/types/matrixiterator.hxx \
diff --git a/scilab/modules/ast/Makefile.in b/scilab/modules/ast/Makefile.in
index d5b2a4f..86ec193 100644
--- a/scilab/modules/ast/Makefile.in
+++ b/scilab/modules/ast/Makefile.in
@@ -245,8 +245,7 @@ am__libsciast_la_SOURCES_DIST = src/c/operations/doublecomplex.c \
245 src/cpp/types/implicitlist.cpp src/cpp/types/int.cpp \ 245 src/cpp/types/implicitlist.cpp src/cpp/types/int.cpp \
246 src/cpp/types/library.cpp src/cpp/types/list.cpp \ 246 src/cpp/types/library.cpp src/cpp/types/list.cpp \
247 src/cpp/types/listdelete.cpp src/cpp/types/listinsert.cpp \ 247 src/cpp/types/listdelete.cpp src/cpp/types/listinsert.cpp \
248 src/cpp/types/listoperation.cpp \ 248 src/cpp/types/listoperation.cpp src/cpp/types/macro.cpp \
249 src/cpp/types/listundefined.cpp src/cpp/types/macro.cpp \
250 src/cpp/types/macrofile.cpp src/cpp/types/mlist.cpp \ 249 src/cpp/types/macrofile.cpp src/cpp/types/mlist.cpp \
251 src/cpp/types/overload.cpp src/cpp/types/polynom.cpp \ 250 src/cpp/types/overload.cpp src/cpp/types/polynom.cpp \
252 src/cpp/types/singlepoly.cpp src/cpp/types/singlestruct.cpp \ 251 src/cpp/types/singlepoly.cpp src/cpp/types/singlestruct.cpp \
@@ -461,7 +460,6 @@ am_libsciast_la_OBJECTS = \
461 src/cpp/types/libsciast_la-listdelete.lo \ 460 src/cpp/types/libsciast_la-listdelete.lo \
462 src/cpp/types/libsciast_la-listinsert.lo \ 461 src/cpp/types/libsciast_la-listinsert.lo \
463 src/cpp/types/libsciast_la-listoperation.lo \ 462 src/cpp/types/libsciast_la-listoperation.lo \
464 src/cpp/types/libsciast_la-listundefined.lo \
465 src/cpp/types/libsciast_la-macro.lo \ 463 src/cpp/types/libsciast_la-macro.lo \
466 src/cpp/types/libsciast_la-macrofile.lo \ 464 src/cpp/types/libsciast_la-macrofile.lo \
467 src/cpp/types/libsciast_la-mlist.lo \ 465 src/cpp/types/libsciast_la-mlist.lo \
@@ -859,7 +857,6 @@ am__depfiles_remade = \
859 src/cpp/types/$(DEPDIR)/libsciast_la-listdelete.Plo \ 857 src/cpp/types/$(DEPDIR)/libsciast_la-listdelete.Plo \
860 src/cpp/types/$(DEPDIR)/libsciast_la-listinsert.Plo \ 858 src/cpp/types/$(DEPDIR)/libsciast_la-listinsert.Plo \
861 src/cpp/types/$(DEPDIR)/libsciast_la-listoperation.Plo \ 859 src/cpp/types/$(DEPDIR)/libsciast_la-listoperation.Plo \
862 src/cpp/types/$(DEPDIR)/libsciast_la-listundefined.Plo \
863 src/cpp/types/$(DEPDIR)/libsciast_la-macro.Plo \ 860 src/cpp/types/$(DEPDIR)/libsciast_la-macro.Plo \
864 src/cpp/types/$(DEPDIR)/libsciast_la-macrofile.Plo \ 861 src/cpp/types/$(DEPDIR)/libsciast_la-macrofile.Plo \
865 src/cpp/types/$(DEPDIR)/libsciast_la-mlist.Plo \ 862 src/cpp/types/$(DEPDIR)/libsciast_la-mlist.Plo \
@@ -1301,8 +1298,7 @@ libsciast_la_SOURCES = src/c/operations/doublecomplex.c \
1301 src/cpp/types/implicitlist.cpp src/cpp/types/int.cpp \ 1298 src/cpp/types/implicitlist.cpp src/cpp/types/int.cpp \
1302 src/cpp/types/library.cpp src/cpp/types/list.cpp \ 1299 src/cpp/types/library.cpp src/cpp/types/list.cpp \
1303 src/cpp/types/listdelete.cpp src/cpp/types/listinsert.cpp \ 1300 src/cpp/types/listdelete.cpp src/cpp/types/listinsert.cpp \
1304 src/cpp/types/listoperation.cpp \ 1301 src/cpp/types/listoperation.cpp src/cpp/types/macro.cpp \
1305 src/cpp/types/listundefined.cpp src/cpp/types/macro.cpp \
1306 src/cpp/types/macrofile.cpp src/cpp/types/mlist.cpp \ 1302 src/cpp/types/macrofile.cpp src/cpp/types/mlist.cpp \
1307 src/cpp/types/overload.cpp src/cpp/types/polynom.cpp \ 1303 src/cpp/types/overload.cpp src/cpp/types/polynom.cpp \
1308 src/cpp/types/singlepoly.cpp src/cpp/types/singlestruct.cpp \ 1304 src/cpp/types/singlepoly.cpp src/cpp/types/singlestruct.cpp \
@@ -1652,7 +1648,6 @@ includes/types/listdelete.hxx \
1652includes/types/list.hxx \ 1648includes/types/list.hxx \
1653includes/types/listinsert.hxx \ 1649includes/types/listinsert.hxx \
1654includes/types/listoperation.hxx \ 1650includes/types/listoperation.hxx \
1655includes/types/listundefined.hxx \
1656includes/types/macrofile.hxx \ 1651includes/types/macrofile.hxx \
1657includes/types/macro.hxx \ 1652includes/types/macro.hxx \
1658includes/types/matrixiterator.hxx \ 1653includes/types/matrixiterator.hxx \
@@ -2098,9 +2093,6 @@ src/cpp/types/libsciast_la-listinsert.lo: \
2098src/cpp/types/libsciast_la-listoperation.lo: \ 2093src/cpp/types/libsciast_la-listoperation.lo: \
2099 src/cpp/types/$(am__dirstamp) \ 2094 src/cpp/types/$(am__dirstamp) \
2100 src/cpp/types/$(DEPDIR)/$(am__dirstamp) 2095 src/cpp/types/$(DEPDIR)/$(am__dirstamp)
2101src/cpp/types/libsciast_la-listundefined.lo: \
2102 src/cpp/types/$(am__dirstamp) \
2103 src/cpp/types/$(DEPDIR)/$(am__dirstamp)
2104src/cpp/types/libsciast_la-macro.lo: src/cpp/types/$(am__dirstamp) \ 2096src/cpp/types/libsciast_la-macro.lo: src/cpp/types/$(am__dirstamp) \
2105 src/cpp/types/$(DEPDIR)/$(am__dirstamp) 2097 src/cpp/types/$(DEPDIR)/$(am__dirstamp)
2106src/cpp/types/libsciast_la-macrofile.lo: \ 2098src/cpp/types/libsciast_la-macrofile.lo: \
@@ -2814,7 +2806,6 @@ distclean-compile:
2814@AMDEP_TRUE@@am__include@ @am__quote@src/cpp/types/$(DEPDIR)/libsciast_la-listdelete.Plo@am__quote@ # am--include-marker 2806@AMDEP_TRUE@@am__include@ @am__quote@src/cpp/types/$(DEPDIR)/libsciast_la-listdelete.Plo@am__quote@ # am--include-marker
2815@AMDEP_TRUE@@am__include@ @am__quote@src/cpp/types/$(DEPDIR)/libsciast_la-listinsert.Plo@am__quote@ # am--include-marker 2807@AMDEP_TRUE@@am__include@ @am__quote@src/cpp/types/$(DEPDIR)/libsciast_la-listinsert.Plo@am__quote@ # am--include-marker
2816@AMDEP_TRUE@@am__include@ @am__quote@src/cpp/types/$(DEPDIR)/libsciast_la-listoperation.Plo@am__quote@ # am--include-marker 2808@AMDEP_TRUE@@am__include@ @am__quote@src/cpp/types/$(DEPDIR)/libsciast_la-listoperation.Plo@am__quote@ # am--include-marker
2817@AMDEP_TRUE@@am__include@ @am__quote@src/cpp/types/$(DEPDIR)/libsciast_la-listundefined.Plo@am__quote@ # am--include-marker
2818@AMDEP_TRUE@@am__include@ @am__quote@src/cpp/types/$(DEPDIR)/libsciast_la-macro.Plo@am__quote@ # am--include-marker 2809@AMDEP_TRUE@@am__include@ @am__quote@src/cpp/types/$(DEPDIR)/libsciast_la-macro.Plo@am__quote@ # am--include-marker
2819@AMDEP_TRUE@@am__include@ @am__quote@src/cpp/types/$(DEPDIR)/libsciast_la-macrofile.Plo@am__quote@ # am--include-marker 2810@AMDEP_TRUE@@am__include@ @am__quote@src/cpp/types/$(DEPDIR)/libsciast_la-macrofile.Plo@am__quote@ # am--include-marker
2820@AMDEP_TRUE@@am__include@ @am__quote@src/cpp/types/$(DEPDIR)/libsciast_la-mlist.Plo@am__quote@ # am--include-marker 2811@AMDEP_TRUE@@am__include@ @am__quote@src/cpp/types/$(DEPDIR)/libsciast_la-mlist.Plo@am__quote@ # am--include-marker
@@ -3440,13 +3431,6 @@ src/cpp/types/libsciast_la-listoperation.lo: src/cpp/types/listoperation.cpp
3440@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 3431@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
3441@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciast_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/cpp/types/libsciast_la-listoperation.lo `test -f 'src/cpp/types/listoperation.cpp' || echo '$(srcdir)/'`src/cpp/types/listoperation.cpp 3432@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciast_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/cpp/types/libsciast_la-listoperation.lo `test -f 'src/cpp/types/listoperation.cpp' || echo '$(srcdir)/'`src/cpp/types/listoperation.cpp
3442 3433
3443src/cpp/types/libsciast_la-listundefined.lo: src/cpp/types/listundefined.cpp
3444@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciast_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/cpp/types/libsciast_la-listundefined.lo -MD -MP -MF src/cpp/types/$(DEPDIR)/libsciast_la-listundefined.Tpo -c -o src/cpp/types/libsciast_la-listundefined.lo `test -f 'src/cpp/types/listundefined.cpp' || echo '$(srcdir)/'`src/cpp/types/listundefined.cpp
3445@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/cpp/types/$(DEPDIR)/libsciast_la-listundefined.Tpo src/cpp/types/$(DEPDIR)/libsciast_la-listundefined.Plo
3446@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/cpp/types/listundefined.cpp' object='src/cpp/types/libsciast_la-listundefined.lo' libtool=yes @AMDEPBACKSLASH@
3447@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
3448@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciast_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/cpp/types/libsciast_la-listundefined.lo `test -f 'src/cpp/types/listundefined.cpp' || echo '$(srcdir)/'`src/cpp/types/listundefined.cpp
3449
3450src/cpp/types/libsciast_la-macro.lo: src/cpp/types/macro.cpp 3434src/cpp/types/libsciast_la-macro.lo: src/cpp/types/macro.cpp
3451@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciast_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/cpp/types/libsciast_la-macro.lo -MD -MP -MF src/cpp/types/$(DEPDIR)/libsciast_la-macro.Tpo -c -o src/cpp/types/libsciast_la-macro.lo `test -f 'src/cpp/types/macro.cpp' || echo '$(srcdir)/'`src/cpp/types/macro.cpp 3435@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciast_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/cpp/types/libsciast_la-macro.lo -MD -MP -MF src/cpp/types/$(DEPDIR)/libsciast_la-macro.Tpo -c -o src/cpp/types/libsciast_la-macro.lo `test -f 'src/cpp/types/macro.cpp' || echo '$(srcdir)/'`src/cpp/types/macro.cpp
3452@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/cpp/types/$(DEPDIR)/libsciast_la-macro.Tpo src/cpp/types/$(DEPDIR)/libsciast_la-macro.Plo 3436@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/cpp/types/$(DEPDIR)/libsciast_la-macro.Tpo src/cpp/types/$(DEPDIR)/libsciast_la-macro.Plo
@@ -5035,7 +5019,6 @@ distclean: distclean-am
5035 -rm -f src/cpp/types/$(DEPDIR)/libsciast_la-listdelete.Plo 5019 -rm -f src/cpp/types/$(DEPDIR)/libsciast_la-listdelete.Plo
5036 -rm -f src/cpp/types/$(DEPDIR)/libsciast_la-listinsert.Plo 5020 -rm -f src/cpp/types/$(DEPDIR)/libsciast_la-listinsert.Plo
5037 -rm -f src/cpp/types/$(DEPDIR)/libsciast_la-listoperation.Plo 5021 -rm -f src/cpp/types/$(DEPDIR)/libsciast_la-listoperation.Plo
5038 -rm -f src/cpp/types/$(DEPDIR)/libsciast_la-listundefined.Plo
5039 -rm -f src/cpp/types/$(DEPDIR)/libsciast_la-macro.Plo 5022 -rm -f src/cpp/types/$(DEPDIR)/libsciast_la-macro.Plo
5040 -rm -f src/cpp/types/$(DEPDIR)/libsciast_la-macrofile.Plo 5023 -rm -f src/cpp/types/$(DEPDIR)/libsciast_la-macrofile.Plo
5041 -rm -f src/cpp/types/$(DEPDIR)/libsciast_la-mlist.Plo 5024 -rm -f src/cpp/types/$(DEPDIR)/libsciast_la-mlist.Plo
@@ -5322,7 +5305,6 @@ maintainer-clean: maintainer-clean-am
5322 -rm -f src/cpp/types/$(DEPDIR)/libsciast_la-listdelete.Plo 5305 -rm -f src/cpp/types/$(DEPDIR)/libsciast_la-listdelete.Plo
5323 -rm -f src/cpp/types/$(DEPDIR)/libsciast_la-listinsert.Plo 5306 -rm -f src/cpp/types/$(DEPDIR)/libsciast_la-listinsert.Plo
5324 -rm -f src/cpp/types/$(DEPDIR)/libsciast_la-listoperation.Plo 5307 -rm -f src/cpp/types/$(DEPDIR)/libsciast_la-listoperation.Plo
5325 -rm -f src/cpp/types/$(DEPDIR)/libsciast_la-listundefined.Plo
5326 -rm -f src/cpp/types/$(DEPDIR)/libsciast_la-macro.Plo 5308 -rm -f src/cpp/types/$(DEPDIR)/libsciast_la-macro.Plo
5327 -rm -f src/cpp/types/$(DEPDIR)/libsciast_la-macrofile.Plo 5309 -rm -f src/cpp/types/$(DEPDIR)/libsciast_la-macrofile.Plo
5328 -rm -f src/cpp/types/$(DEPDIR)/libsciast_la-mlist.Plo 5310 -rm -f src/cpp/types/$(DEPDIR)/libsciast_la-mlist.Plo
diff --git a/scilab/modules/ast/ast.vcxproj b/scilab/modules/ast/ast.vcxproj
index e3e62cd..798cc34 100644
--- a/scilab/modules/ast/ast.vcxproj
+++ b/scilab/modules/ast/ast.vcxproj
@@ -490,7 +490,6 @@ lib /DEF:"$(ProjectDir)functions_manager_import.def" /SUBSYSTEM:WINDOWS /MACHINE
490 <ClInclude Include="includes\types\listdelete.hxx" /> 490 <ClInclude Include="includes\types\listdelete.hxx" />
491 <ClInclude Include="includes\types\listinsert.hxx" /> 491 <ClInclude Include="includes\types\listinsert.hxx" />
492 <ClInclude Include="includes\types\listoperation.hxx" /> 492 <ClInclude Include="includes\types\listoperation.hxx" />
493 <ClInclude Include="includes\types\listundefined.hxx" />
494 <ClInclude Include="includes\types\macro.hxx" /> 493 <ClInclude Include="includes\types\macro.hxx" />
495 <ClInclude Include="includes\types\macrofile.hxx" /> 494 <ClInclude Include="includes\types\macrofile.hxx" />
496 <ClInclude Include="includes\types\matrixiterator.hxx" /> 495 <ClInclude Include="includes\types\matrixiterator.hxx" />
@@ -727,7 +726,6 @@ lib /DEF:"$(ProjectDir)functions_manager_import.def" /SUBSYSTEM:WINDOWS /MACHINE
727 <ClCompile Include="src\cpp\types\listdelete.cpp" /> 726 <ClCompile Include="src\cpp\types\listdelete.cpp" />
728 <ClCompile Include="src\cpp\types\listinsert.cpp" /> 727 <ClCompile Include="src\cpp\types\listinsert.cpp" />
729 <ClCompile Include="src\cpp\types\listoperation.cpp" /> 728 <ClCompile Include="src\cpp\types\listoperation.cpp" />
730 <ClCompile Include="src\cpp\types\listundefined.cpp" />
731 <ClCompile Include="src\cpp\types\macro.cpp" /> 729 <ClCompile Include="src\cpp\types\macro.cpp" />
732 <ClCompile Include="src\cpp\types\macrofile.cpp" /> 730 <ClCompile Include="src\cpp\types\macrofile.cpp" />
733 <ClCompile Include="src\cpp\types\mlist.cpp" /> 731 <ClCompile Include="src\cpp\types\mlist.cpp" />
@@ -770,4 +768,4 @@ lib /DEF:"$(ProjectDir)functions_manager_import.def" /SUBSYSTEM:WINDOWS /MACHINE
770 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> 768 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
771 <ImportGroup Label="ExtensionTargets"> 769 <ImportGroup Label="ExtensionTargets">
772 </ImportGroup> 770 </ImportGroup>
773</Project> \ No newline at end of file 771</Project>
diff --git a/scilab/modules/ast/ast.vcxproj.filters b/scilab/modules/ast/ast.vcxproj.filters
index 8234f7e..9369db1 100644
--- a/scilab/modules/ast/ast.vcxproj.filters
+++ b/scilab/modules/ast/ast.vcxproj.filters
@@ -385,9 +385,6 @@
385 <ClInclude Include="includes\types\listoperation.hxx"> 385 <ClInclude Include="includes\types\listoperation.hxx">
386 <Filter>Header Files\types</Filter> 386 <Filter>Header Files\types</Filter>
387 </ClInclude> 387 </ClInclude>
388 <ClInclude Include="includes\types\listundefined.hxx">
389 <Filter>Header Files\types</Filter>
390 </ClInclude>
391 <ClInclude Include="includes\types\macro.hxx"> 388 <ClInclude Include="includes\types\macro.hxx">
392 <Filter>Header Files\types</Filter> 389 <Filter>Header Files\types</Filter>
393 </ClInclude> 390 </ClInclude>
@@ -933,9 +930,6 @@
933 <ClCompile Include="src\cpp\types\listoperation.cpp"> 930 <ClCompile Include="src\cpp\types\listoperation.cpp">
934 <Filter>Source Files\types</Filter> 931 <Filter>Source Files\types</Filter>
935 </ClCompile> 932 </ClCompile>
936 <ClCompile Include="src\cpp\types\listundefined.cpp">
937 <Filter>Source Files\types</Filter>
938 </ClCompile>
939 <ClCompile Include="src\cpp\types\macro.cpp"> 933 <ClCompile Include="src\cpp\types\macro.cpp">
940 <Filter>Source Files\types</Filter> 934 <Filter>Source Files\types</Filter>
941 </ClCompile> 935 </ClCompile>
@@ -1579,4 +1573,4 @@
1579 <Filter>Source Files\ast</Filter> 1573 <Filter>Source Files\ast</Filter>
1580 </ClCompile> 1574 </ClCompile>
1581 </ItemGroup> 1575 </ItemGroup>
1582</Project> \ No newline at end of file 1576</Project>
diff --git a/scilab/modules/ast/includes/types/alltypes.hxx b/scilab/modules/ast/includes/types/alltypes.hxx
index 93de298..a734463 100644
--- a/scilab/modules/ast/includes/types/alltypes.hxx
+++ b/scilab/modules/ast/includes/types/alltypes.hxx
@@ -40,7 +40,6 @@
40#include "listoperation.hxx" 40#include "listoperation.hxx"
41#include "listdelete.hxx" 41#include "listdelete.hxx"
42#include "listinsert.hxx" 42#include "listinsert.hxx"
43#include "listundefined.hxx"
44#include "tlist.hxx" 43#include "tlist.hxx"
45#include "mlist.hxx" 44#include "mlist.hxx"
46#include "file.hxx" 45#include "file.hxx"
diff --git a/scilab/modules/ast/includes/types/internal.hxx b/scilab/modules/ast/includes/types/internal.hxx
index d254805..0e141f6 100644
--- a/scilab/modules/ast/includes/types/internal.hxx
+++ b/scilab/modules/ast/includes/types/internal.hxx
@@ -403,10 +403,10 @@ public :
403 virtual bool isListOperation(void); 403 virtual bool isListOperation(void);
404 virtual bool isListDelete(void); 404 virtual bool isListDelete(void);
405 virtual bool isListInsert(void); 405 virtual bool isListInsert(void);
406 virtual bool isListUndefined(void);
407 virtual bool isPointer(void); 406 virtual bool isPointer(void);
408 virtual bool isLibrary(void); 407 virtual bool isLibrary(void);
409 virtual bool isUserType(void); 408 virtual bool isUserType(void);
409 virtual bool isVoid(void);
410 410
411 void clearPrintState(); 411 void clearPrintState();
412 412
diff --git a/scilab/modules/ast/includes/types/listundefined.hxx b/scilab/modules/ast/includes/types/listundefined.hxx
deleted file mode 100644
index 9845263..0000000
--- a/scilab/modules/ast/includes/types/listundefined.hxx
+++ /dev/null
@@ -1,57 +0,0 @@
1/*
2 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 * Copyright (C) 2009-2010 - DIGITEO - Antoine ELIAS
4 *
5 * Copyright (C) 2012 - 2016 - Scilab Enterprises
6 *
7 * This file is hereby licensed under the terms of the GNU GPL v2.0,
8 * pursuant to article 5.3.4 of the CeCILL v.2.1.
9 * This file was originally licensed under the terms of the CeCILL v2.1,
10 * and continues to be available under such terms.
11 * For more information, see the COPYING file which you should have received
12 * along with this program.
13 *
14 */
15
16#ifndef __LISTUNDEFINED_HXX__
17#define __LISTUNDEFINED_HXX__
18
19#include "types.hxx"
20#include "listoperation.hxx"
21
22namespace types
23{
24class EXTERN_AST ListUndefined : public ListOperation
25{
26public :
27 ListUndefined(): ListOperation() {};
28 virtual ~ListUndefined();
29
30 // FIXME : Should not return NULL;
31 ListUndefined* clone();
32
33 ScilabType getType(void);
34 bool isListUndefined()
35 {
36 return true;
37 }
38
39 void whoAmI();
40
41 bool toString(std::wostringstream& ostr);
42
43 /* return type as string ( double, int, cell, list, ... )*/
44 virtual std::wstring getTypeStr() const
45 {
46 return L"listundefined";
47 }
48 /* return type as short string ( s, i, ce, l, ... )*/
49 virtual std::wstring getShortTypeStr() const
50 {
51 return L"";
52 }
53};
54}
55
56
57#endif /* !__LISTUNDEFINED_HXX__ */
diff --git a/scilab/modules/ast/includes/types/void.hxx b/scilab/modules/ast/includes/types/void.hxx
index a7b616d..eb60cdb 100644
--- a/scilab/modules/ast/includes/types/void.hxx
+++ b/scilab/modules/ast/includes/types/void.hxx
@@ -37,7 +37,7 @@ public :
37 return IdVoid; 37 return IdVoid;
38 } 38 }
39 39
40 bool isVoid() 40 bool isVoid() override
41 { 41 {
42 return true; 42 return true;
43 } 43 }
diff --git a/scilab/modules/ast/src/cpp/ast/visitor_common.cpp b/scilab/modules/ast/src/cpp/ast/visitor_common.cpp
index b873906..3e3ead4 100644
--- a/scilab/modules/ast/src/cpp/ast/visitor_common.cpp
+++ b/scilab/modules/ast/src/cpp/ast/visitor_common.cpp
@@ -1063,7 +1063,7 @@ types::InternalType* evaluateFields(const ast::Exp* _pExp, std::list<ExpHistory*
1063 int iNewSize = pEH->getSizeFromArgs(); 1063 int iNewSize = pEH->getSizeFromArgs();
1064 if (pTL->getSize() < iNewSize) 1064 if (pTL->getSize() < iNewSize)
1065 { 1065 {
1066 pTL = pTL->set(iNewSize - 1, new types::ListUndefined()); 1066 pTL = pTL->set(iNewSize - 1, new types::Void());
1067 pEH->setCurrent(pTL); 1067 pEH->setCurrent(pTL);
1068 } 1068 }
1069 1069
@@ -1219,7 +1219,7 @@ types::InternalType* evaluateFields(const ast::Exp* _pExp, std::list<ExpHistory*
1219 int iNewSize = pEH->getSizeFromArgs(); 1219 int iNewSize = pEH->getSizeFromArgs();
1220 if (pL->getSize() < iNewSize) 1220 if (pL->getSize() < iNewSize)
1221 { 1221 {
1222 pL = pL->set(iNewSize - 1, new types::ListUndefined()); 1222 pL = pL->set(iNewSize - 1, new types::Void());
1223 pEH->setCurrent(pL); 1223 pEH->setCurrent(pL);
1224 } 1224 }
1225 1225
diff --git a/scilab/modules/ast/src/cpp/types/internal.cpp b/scilab/modules/ast/src/cpp/types/internal.cpp
index 0f1e34b..f01b788 100644
--- a/scilab/modules/ast/src/cpp/types/internal.cpp
+++ b/scilab/modules/ast/src/cpp/types/internal.cpp
@@ -305,22 +305,22 @@ bool InternalType::isListInsert(void)
305 return false; 305 return false;
306} 306}
307 307
308bool InternalType::isListUndefined(void) 308bool InternalType::isPointer(void)
309{ 309{
310 return false; 310 return false;
311} 311}
312 312
313bool InternalType::isPointer(void) 313bool InternalType::isLibrary(void)
314{ 314{
315 return false; 315 return false;
316} 316}
317 317
318bool InternalType::isLibrary(void) 318bool InternalType::isUserType(void)
319{ 319{
320 return false; 320 return false;
321} 321}
322 322
323bool InternalType::isUserType(void) 323bool InternalType::isVoid(void)
324{ 324{
325 return false; 325 return false;
326} 326}
diff --git a/scilab/modules/ast/src/cpp/types/list.cpp b/scilab/modules/ast/src/cpp/types/list.cpp
index 5f8e325..51a7c04 100644
--- a/scilab/modules/ast/src/cpp/types/list.cpp
+++ b/scilab/modules/ast/src/cpp/types/list.cpp
@@ -16,7 +16,7 @@
16#include <sstream> 16#include <sstream>
17#include "double.hxx" 17#include "double.hxx"
18#include "list.hxx" 18#include "list.hxx"
19#include "listundefined.hxx" 19#include "void.hxx"
20#include "listinsert.hxx" 20#include "listinsert.hxx"
21#include "types_tools.hxx" 21#include "types_tools.hxx"
22#include "localization.hxx" 22#include "localization.hxx"
@@ -301,8 +301,8 @@ List* List::insert(typed_list* _pArgs, InternalType* _pSource)
301 //try to insert after the last index, increase list size and assign value 301 //try to insert after the last index, increase list size and assign value
302 while ((int)m_plData->size() < idx) 302 while ((int)m_plData->size() < idx)
303 { 303 {
304 //incease list size and fill with "Undefined" 304 //incease list size and fill with Void type object
305 m_plData->push_back(new ListUndefined()); 305 m_plData->push_back(new types::Void());
306 } 306 }
307 (*m_plData)[idx - 1] = pInsert; 307 (*m_plData)[idx - 1] = pInsert;
308 } 308 }
@@ -321,8 +321,8 @@ List* List::insert(typed_list* _pArgs, InternalType* _pSource)
321 { 321 {
322 while ((int)m_plData->size() < idx) 322 while ((int)m_plData->size() < idx)
323 { 323 {
324 //incease list size and fill with "Undefined" 324 //incease list size and fill with Void type object
325 InternalType* pLU = new ListUndefined(); 325 InternalType* pLU = new types::Void();
326 pLU->IncreaseRef(); 326 pLU->IncreaseRef();
327 m_plData->push_back(pLU); 327 m_plData->push_back(pLU);
328 } 328 }
@@ -368,8 +368,8 @@ List* List::set(const int _iIndex, InternalType* _pIT)
368 368
369 while ((int)m_plData->size() < _iIndex) 369 while ((int)m_plData->size() < _iIndex)
370 { 370 {
371 //incease list size and fill with "Undefined" 371 //incease list size and fill with Void type object
372 m_plData->push_back(new ListUndefined()); 372 m_plData->push_back(new types::Void());
373 m_plData->back()->IncreaseRef(); 373 m_plData->back()->IncreaseRef();
374 m_iSize = getSize(); 374 m_iSize = getSize();
375 } 375 }
diff --git a/scilab/modules/ast/src/cpp/types/listundefined.cpp b/scilab/modules/ast/src/cpp/types/listundefined.cpp
deleted file mode 100644
index 2d457c3..0000000
--- a/scilab/modules/ast/src/cpp/types/listundefined.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
1/*
2* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3* Copyright (C) 2009-2009 - DIGITEO - Antoine ELIAS
4*
5 * Copyright (C) 2012 - 2016 - Scilab Enterprises
6 *
7 * This file is hereby licensed under the terms of the GNU GPL v2.0,
8 * pursuant to article 5.3.4 of the CeCILL v.2.1.
9 * This file was originally licensed under the terms of the CeCILL v2.1,
10 * and continues to be available under such terms.
11 * For more information, see the COPYING file which you should have received
12 * along with this program.
13*
14*/
15
16#include <sstream>
17#include <cstdio>
18
19#include "listundefined.hxx"
20#include "localization.h"
21#include "scilabWrite.hxx"
22
23namespace types
24{
25ListUndefined::~ListUndefined()
26{
27}
28
29void ListUndefined::whoAmI()
30{
31 std::cout << "types::ListUndefined";
32}
33
34ListUndefined* ListUndefined::clone(void)
35{
36 return new ListUndefined();
37}
38
39InternalType::ScilabType ListUndefined::getType(void)
40{
41 return ScilabListUndefinedOperation;
42}
43
44bool ListUndefined::toString(std::wostringstream& ostr)
45{
46 ostr << L" Undefined" << std::endl;
47 return true;
48}
49}
diff --git a/scilab/modules/ast/src/cpp/types/macro.cpp b/scilab/modules/ast/src/cpp/types/macro.cpp
index c78c572..f7e473f 100644
--- a/scilab/modules/ast/src/cpp/types/macro.cpp
+++ b/scilab/modules/ast/src/cpp/types/macro.cpp
@@ -19,6 +19,7 @@
19 19
20#include "macro.hxx" 20#include "macro.hxx"
21#include "list.hxx" 21#include "list.hxx"
22#include "void.hxx"
22#include "listinsert.hxx" 23#include "listinsert.hxx"
23#include "string.hxx" 24#include "string.hxx"
24#include "context.hxx" 25#include "context.hxx"
@@ -405,7 +406,7 @@ Callable::ReturnValue Macro::call(typed_list &in, optional_list &opt, int _iRetC
405 for (int i = 0 ; i < size ; ++i) 406 for (int i = 0 ; i < size ; ++i)
406 { 407 {
407 InternalType* pIT = pVarOut->get(i); 408 InternalType* pIT = pVarOut->get(i);
408 if (pIT->isListUndefined()) 409 if (pIT->isVoid())
409 { 410 {
410 for (int j = 0; j < i; ++j) 411 for (int j = 0; j < i; ++j)
411 { 412 {
diff --git a/scilab/modules/ast/src/cpp/types/tlist.cpp b/scilab/modules/ast/src/cpp/types/tlist.cpp
index 8390293..aa6ffc7 100644
--- a/scilab/modules/ast/src/cpp/types/tlist.cpp
+++ b/scilab/modules/ast/src/cpp/types/tlist.cpp
@@ -19,7 +19,6 @@
19#include "string.hxx" 19#include "string.hxx"
20#include "list.hxx" 20#include "list.hxx"
21#include "tlist.hxx" 21#include "tlist.hxx"
22#include "listundefined.hxx"
23#include "callable.hxx" 22#include "callable.hxx"
24#include "polynom.hxx" 23#include "polynom.hxx"
25#include "overload.hxx" 24#include "overload.hxx"
diff --git a/scilab/modules/ast/tests/nonreg_tests/bug_16051.tst b/scilab/modules/ast/tests/nonreg_tests/bug_16051.tst
new file mode 100644
index 0000000..eb04149
--- /dev/null
+++ b/scilab/modules/ast/tests/nonreg_tests/bug_16051.tst
@@ -0,0 +1,24 @@
1// =============================================================================
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) 2019 - St├ęphane MOTTELET
4//
5// This file is distributed under the same license as the Scilab package.
6// =============================================================================
7//
8// <-- CLI SHELL MODE -->
9// <-- NO CHECK REF -->
10//
11// <-- Non-regression test for bug 16051 -->
12//
13// <-- Bugzilla URL -->
14// http://bugzilla.scilab.org/16051
15//
16// <-- Short Description -->
17// undefined list elements can be of 2 distinct typeof "void" or "listundefined" according to the way they are created
18
19L = list(,);
20L(4) = 1;
21assert_checkequal(type(L(1)), 0)
22assert_checkequal(type(L(3)), 0)
23assert_checkequal(typeof(L(1)), "void")
24assert_checkequal(typeof(L(3)), "void")
diff --git a/scilab/modules/core/sci_gateway/cpp/sci_insert.cpp b/scilab/modules/core/sci_gateway/cpp/sci_insert.cpp
index eab3f38..a66a9d3 100644
--- a/scilab/modules/core/sci_gateway/cpp/sci_insert.cpp
+++ b/scilab/modules/core/sci_gateway/cpp/sci_insert.cpp
@@ -16,13 +16,13 @@
16#include "core_gw.hxx" 16#include "core_gw.hxx"
17#include "function.hxx" 17#include "function.hxx"
18#include "listinsert.hxx" 18#include "listinsert.hxx"
19#include "listundefined.hxx" 19#include "void.hxx"
20 20
21types::Function::ReturnValue sci_insert(types::typed_list &in, int _piRetCount, types::typed_list &out) 21types::Function::ReturnValue sci_insert(types::typed_list &in, int _piRetCount, types::typed_list &out)
22{ 22{
23 if (in.size() == 0) 23 if (in.size() == 0)
24 { 24 {
25 out.push_back(new types::ListInsert(new types::ListUndefined())); 25 out.push_back(new types::ListInsert(new types::Void()));
26 } 26 }
27 else 27 else
28 { 28 {
diff --git a/scilab/modules/data_structures/sci_gateway/cpp/sci_getfield.cpp b/scilab/modules/data_structures/sci_gateway/cpp/sci_getfield.cpp
index 2196996..7a03719 100644
--- a/scilab/modules/data_structures/sci_gateway/cpp/sci_getfield.cpp
+++ b/scilab/modules/data_structures/sci_gateway/cpp/sci_getfield.cpp
@@ -125,7 +125,7 @@ types::Function::ReturnValue sci_getfield(types::typed_list &in, int _iRetCount,
125 int iIndex = 0; 125 int iIndex = 0;
126 for (int i = 0; i < iListSize; i++) 126 for (int i = 0; i < iListSize; i++)
127 { 127 {
128 if (pList->get(i)->isListUndefined()) 128 if (pList->get(i)->isVoid())
129 { 129 {
130 switch (pIndex->getType()) 130 switch (pIndex->getType())
131 { 131 {
diff --git a/scilab/modules/hdf5/sci_gateway/cpp/sci_hdf5_load_v3.cpp b/scilab/modules/hdf5/sci_gateway/cpp/sci_hdf5_load_v3.cpp
index 0f7583b..333855c 100644
--- a/scilab/modules/hdf5/sci_gateway/cpp/sci_hdf5_load_v3.cpp
+++ b/scilab/modules/hdf5/sci_gateway/cpp/sci_hdf5_load_v3.cpp
@@ -31,7 +31,6 @@
31#include "graphichandle.hxx" 31#include "graphichandle.hxx"
32#include "macro.hxx" 32#include "macro.hxx"
33#include "void.hxx" 33#include "void.hxx"
34#include "listundefined.hxx"
35#include "context.hxx" 34#include "context.hxx"
36#include "handle_properties.hxx" 35#include "handle_properties.hxx"
37#include "deserializervisitor.hxx" 36#include "deserializervisitor.hxx"
@@ -283,7 +282,7 @@ types::InternalType* import_data(hid_t dataset)
283 if (type == g_SCILAB_CLASS_UNDEFINED) 282 if (type == g_SCILAB_CLASS_UNDEFINED)
284 { 283 {
285 closeDataSet(dataset); 284 closeDataSet(dataset);
286 return new types::ListUndefined(); 285 return new types::Void();
287 } 286 }
288 287
289 if (type == g_SCILAB_CLASS_USERTYPE) 288 if (type == g_SCILAB_CLASS_USERTYPE)