* [#15489](http://bugzilla.scilab.org/show_bug.cgi?id=15489): Help pages of `covStart`, `covStop`, `covWrite` and `covMerge` were not built for the fr, ja, pt and ru languages, and were unreachable from a session in non `en_US` language.
* [#15495](http://bugzilla.scilab.org/show_bug.cgi?id=15495): SampleCLK simple demo failed to simulate.
* [#15496](http://bugzilla.scilab.org/show_bug.cgi?id=15496): Scinotes `File > Open recent` menu was not updated when it should.
+* [#15497](http://bugzilla.scilab.org/show_bug.cgi?id=15497): After `s.a=list(1)`, `type(s("a"))` was `1`.
* [#15499](http://bugzilla.scilab.org/show_bug.cgi?id=15499): Scinotes menus were inactive after session restore under OSX.
* [#15501](http://bugzilla.scilab.org/show_bug.cgi?id=15501): listvarinfile() crashes Scilab when listing a cell array (regression).
* [#15502](http://bugzilla.scilab.org/show_bug.cgi?id=15502): listvarinfile() misses listing arrays of struct, and then locks the file.
bool Struct::invoke(typed_list & in, optional_list & opt, int _iRetCount, typed_list & out, const ast::Exp & e)
{
+
if (in.size() == 0)
{
out.push_back(this);
}
_out = extractFields(wstFields);
- if (_out.size() == 1)
- {
- InternalType * pIT = _out[0];
- if (pIT->isList() && pIT->getAs<List>()->getSize() == 1)
- {
- out.push_back(pIT->getAs<List>()->get(0));
- return true;
- }
- }
out.swap(_out);
return true;
--- /dev/null
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2018 - Clement DAVID
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+//
+// <-- CLI SHELL MODE -->
+// <-- NO CHECK REF -->
+//
+// <-- Non-regression test for bug 15497 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/15497
+//
+// <-- Short Description -->
+// Structures containing lists with 1 element : wrong type with syntax: structure("field")
+
+s.a = list(3.1415);
+assert_checkequal(type(s), 17);
+assert_checkequal(type(s.a), 15);
+assert_checkequal(type(s.a(1)), 1);
+
+assert_checkequal(type(s), 17);
+assert_checkequal(type(s("a")), 15);
+assert_checkequal(type(s("a")(1)), 1);