Hello community, here is the log from the commit of package yast2-core for openSUSE:Factory checked in at Mon Jun 20 09:40:30 CEST 2011.
-------- --- yast2-core/yast2-core.changes 2011-06-02 10:03:15.000000000 +0200 +++ /mounts/work_src_done/STABLE/yast2-core/yast2-core.changes 2011-06-17 16:25:09.000000000 +0200 @@ -1,0 +2,6 @@ +Fri Jun 17 16:21:50 CEST 2011 - [email protected] + +- when if-condition evaluates to nil, use false instead (bnc#687236) +- 2.21.4 + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- yast2-core-2.21.3.tar.bz2 New: ---- yast2-core-2.21.4.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-core.spec ++++++ --- /var/tmp/diff_new_pack.GO0SDj/_old 2011-06-20 09:39:37.000000000 +0200 +++ /var/tmp/diff_new_pack.GO0SDj/_new 2011-06-20 09:39:37.000000000 +0200 @@ -19,11 +19,11 @@ Name: yast2-core -Version: 2.21.3 +Version: 2.21.4 Release: 1 BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source0: yast2-core-2.21.3.tar.bz2 +Source0: yast2-core-2.21.4.tar.bz2 Prefix: /usr @@ -77,7 +77,7 @@ applications using the YaST2 YCP interpreter. %prep -%setup -n yast2-core-2.21.3 +%setup -n yast2-core-2.21.4 %build ++++++ yast2-core-2.21.3.tar.bz2 -> yast2-core-2.21.4.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-core-2.21.3/VERSION new/yast2-core-2.21.4/VERSION --- old/yast2-core-2.21.3/VERSION 2011-06-02 09:58:05.000000000 +0200 +++ new/yast2-core-2.21.4/VERSION 2011-06-17 16:22:40.000000000 +0200 @@ -1 +1 @@ -2.21.3 +2.21.4 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-core-2.21.3/agent-modules/testsuite/tests/dir.scr new/yast2-core-2.21.4/agent-modules/testsuite/tests/dir.scr --- old/yast2-core-2.21.3/agent-modules/testsuite/tests/dir.scr 2011-03-30 12:25:54.000000000 +0200 +++ new/yast2-core-2.21.4/agent-modules/testsuite/tests/dir.scr 1970-01-01 01:00:00.000000000 +0100 @@ -1,6 +0,0 @@ -. - -`ag_modules( - `ModulesConf("tests/dir.in.test") -) - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-core-2.21.3/agent-modules/testsuite/tests/missing.scr new/yast2-core-2.21.4/agent-modules/testsuite/tests/missing.scr --- old/yast2-core-2.21.3/agent-modules/testsuite/tests/missing.scr 2011-03-30 12:25:54.000000000 +0200 +++ new/yast2-core-2.21.4/agent-modules/testsuite/tests/missing.scr 1970-01-01 01:00:00.000000000 +0100 @@ -1,6 +0,0 @@ -. - -`ag_modules( - `ModulesConf("tests/missing.in.test") -) - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-core-2.21.3/agent-modules/testsuite/tests/read1.scr new/yast2-core-2.21.4/agent-modules/testsuite/tests/read1.scr --- old/yast2-core-2.21.3/agent-modules/testsuite/tests/read1.scr 2011-03-30 12:25:54.000000000 +0200 +++ new/yast2-core-2.21.4/agent-modules/testsuite/tests/read1.scr 1970-01-01 01:00:00.000000000 +0100 @@ -1,6 +0,0 @@ -. - -`ag_modules( - `ModulesConf("tests/read1.in.test") -) - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-core-2.21.3/agent-modules/testsuite/tests/write1.scr new/yast2-core-2.21.4/agent-modules/testsuite/tests/write1.scr --- old/yast2-core-2.21.3/agent-modules/testsuite/tests/write1.scr 2011-03-30 12:25:46.000000000 +0200 +++ new/yast2-core-2.21.4/agent-modules/testsuite/tests/write1.scr 1970-01-01 01:00:00.000000000 +0100 @@ -1,6 +0,0 @@ -. - -`ag_modules( - `ModulesConf("tests/write1.in.test") -) - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-core-2.21.3/agent-modules/testsuite/tests/write2.scr new/yast2-core-2.21.4/agent-modules/testsuite/tests/write2.scr --- old/yast2-core-2.21.3/agent-modules/testsuite/tests/write2.scr 2011-03-30 12:25:54.000000000 +0200 +++ new/yast2-core-2.21.4/agent-modules/testsuite/tests/write2.scr 1970-01-01 01:00:00.000000000 +0100 @@ -1,6 +0,0 @@ -. - -`ag_modules( - `ModulesConf("tests/write2.in.test") -) - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-core-2.21.3/agent-modules/testsuite/tests/write3.scr new/yast2-core-2.21.4/agent-modules/testsuite/tests/write3.scr --- old/yast2-core-2.21.3/agent-modules/testsuite/tests/write3.scr 2011-03-30 12:25:54.000000000 +0200 +++ new/yast2-core-2.21.4/agent-modules/testsuite/tests/write3.scr 1970-01-01 01:00:00.000000000 +0100 @@ -1,6 +0,0 @@ -. - -`ag_modules( - `ModulesConf("tests/write3.in.test") -) - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-core-2.21.3/agents-perl/doc/ycp-pm-pod.html new/yast2-core-2.21.4/agents-perl/doc/ycp-pm-pod.html --- old/yast2-core-2.21.3/agents-perl/doc/ycp-pm-pod.html 2010-02-02 11:59:03.000000000 +0100 +++ new/yast2-core-2.21.4/agents-perl/doc/ycp-pm-pod.html 2011-04-04 09:16:20.000000000 +0200 @@ -104,36 +104,31 @@ <p>A PerlYCPValue cannot represent a term but only a term is allowed to initialize an agent in a .scr file. Therefore <a href="#parseterm">ParseTerm</a> is provided.</p> <dl> -<dt><strong><a name="string_integer_boolean" class="item">string, integer, boolean</a></strong> +<dt><strong><a name="string_integer_boolean" class="item">string, integer, boolean</a></strong></dt> <dd> <p>Stored as a scalar.</p> </dd> -</li> -<dt><strong><a name="list" class="item">list</a></strong> +<dt><strong><a name="list" class="item">list</a></strong></dt> <dd> <p>Stored as a reference to a list of PerlYCPValues.</p> </dd> -</li> -<dt><strong><a name="map" class="item">map</a></strong> +<dt><strong><a name="map" class="item">map</a></strong></dt> <dd> <p>Stored as a reference to a map of PerlYCPValues.</p> </dd> -</li> -<dt><strong><a name="path" class="item">path</a></strong> +<dt><strong><a name="path" class="item">path</a></strong></dt> <dd> <p>Stored as a reference to a string (starting with a "." as expected).</p> </dd> -</li> -<dt><strong><a name="nil" class="item">nil (void)</a></strong> +<dt><strong><a name="nil" class="item">nil (void)</a></strong></dt> <dd> <p>Stored as an undef.</p> </dd> -</li> </dl> <p> </p> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-core-2.21.3/configure new/yast2-core-2.21.4/configure --- old/yast2-core-2.21.3/configure 2011-06-02 10:02:07.000000000 +0200 +++ new/yast2-core-2.21.4/configure 2011-05-26 10:22:31.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for yast2-core 2.21.3. +# Generated by GNU Autoconf 2.68 for yast2-core 2.21.0. # # Report bugs to <http://bugs.opensuse.org/>. # @@ -709,8 +709,8 @@ # Identity of this package. PACKAGE_NAME='yast2-core' PACKAGE_TARNAME='yast2-core' -PACKAGE_VERSION='2.21.3' -PACKAGE_STRING='yast2-core 2.21.3' +PACKAGE_VERSION='2.21.0' +PACKAGE_STRING='yast2-core 2.21.0' PACKAGE_BUGREPORT='http://bugs.opensuse.org/' PACKAGE_URL='' @@ -1507,7 +1507,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures yast2-core 2.21.3 to adapt to many kinds of systems. +\`configure' configures yast2-core 2.21.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1578,7 +1578,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of yast2-core 2.21.3:";; + short | recursive ) echo "Configuration of yast2-core 2.21.0:";; esac cat <<\_ACEOF @@ -1693,7 +1693,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -yast2-core configure 2.21.3 +yast2-core configure 2.21.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -2237,7 +2237,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by yast2-core $as_me 2.21.3, which was +It was created by yast2-core $as_me 2.21.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -3167,7 +3167,7 @@ # Define the identity of the package. PACKAGE='yast2-core' - VERSION='2.21.3' + VERSION='2.21.0' cat >>confdefs.h <<_ACEOF @@ -3289,7 +3289,7 @@ -VERSION="2.21.3" +VERSION="2.21.0" RPMNAME="yast2-core" MAINTAINER="Martin Vidner <[email protected]>" @@ -17808,7 +17808,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by yast2-core $as_me 2.21.3, which was +This file was extended by yast2-core $as_me 2.21.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17874,7 +17874,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -yast2-core config.status 2.21.3 +yast2-core config.status 2.21.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-core-2.21.3/configure.in new/yast2-core-2.21.4/configure.in --- old/yast2-core-2.21.3/configure.in 2011-06-02 10:01:58.000000000 +0200 +++ new/yast2-core-2.21.4/configure.in 2011-05-26 10:22:22.000000000 +0200 @@ -3,7 +3,7 @@ dnl -- This file is generated by y2autoconf 2.18.11 - DO NOT EDIT! -- dnl (edit configure.in.in instead) -AC_INIT(yast2-core, 2.21.3, http://bugs.opensuse.org/, yast2-core) +AC_INIT(yast2-core, 2.21.0, http://bugs.opensuse.org/, yast2-core) dnl Check for presence of file 'RPMNAME' AC_CONFIG_SRCDIR([RPMNAME]) @@ -18,7 +18,7 @@ AM_INIT_AUTOMAKE(tar-ustar -Wno-portability) dnl Important YaST2 variables -VERSION="2.21.3" +VERSION="2.21.0" RPMNAME="yast2-core" MAINTAINER="Martin Vidner <[email protected]>" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-core-2.21.3/libycp/src/YCPBuiltinBoolean.cc new/yast2-core-2.21.4/libycp/src/YCPBuiltinBoolean.cc --- old/yast2-core-2.21.3/libycp/src/YCPBuiltinBoolean.cc 2010-02-02 11:57:19.000000000 +0100 +++ new/yast2-core-2.21.4/libycp/src/YCPBuiltinBoolean.cc 2011-06-16 14:38:53.000000000 +0200 @@ -21,6 +21,10 @@ #include "ycp/YCPBoolean.h" #include "ycp/YCPCode.h" #include "ycp/StaticDeclaration.h" +#include "ycp/y2log.h" +#include "ycp/ExecutionEnvironment.h" + +extern ExecutionEnvironment ee; extern StaticDeclaration static_declarations; @@ -60,16 +64,18 @@ if (b1_v.isNull () || b1_v->isVoid ()) { - return YCPNull (); + ycp2warning (ee.filename().c_str(), ee.linenumber(), "First operand of '||' evaluates to nil, using 'false' instead."); } - - if (b1_v->asBoolean ()->value ()) + else if (b1_v->asBoolean ()->value ()) + { return YCPBoolean (true); + } YCPValue b2_v = b2->code ()->evaluate (); if (b2_v.isNull () || b2_v->isVoid ()) { - return YCPNull (); + ycp2warning (ee.filename().c_str(), ee.linenumber(), "Second operand of '||' evaluates to nil, using 'false' instead."); + return YCPBoolean (false); } return YCPBoolean (b2_v->asBoolean ()->value ()); @@ -92,7 +98,8 @@ if (b1_v.isNull () || b1_v->isVoid ()) { - return YCPNull (); + ycp2warning (ee.filename().c_str(), ee.linenumber(), "First operand of '&&' evaluates to nil, using 'false' instead."); + return YCPBoolean (false); } if (! b1_v->asBoolean ()->value ()) @@ -101,7 +108,8 @@ YCPValue b2_v = b2->code ()->evaluate (); if (b2_v.isNull () || b2_v->isVoid ()) { - return YCPNull (); + ycp2warning (ee.filename().c_str(), ee.linenumber(), "Second operand of '&&' evaluates to nil, using 'false' instead."); + return YCPBoolean (false); } return YCPBoolean (b2_v->asBoolean ()->value ()); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-core-2.21.3/libycp/src/YExpression.cc new/yast2-core-2.21.4/libycp/src/YExpression.cc --- old/yast2-core-2.21.3/libycp/src/YExpression.cc 2011-05-27 09:37:22.000000000 +0200 +++ new/yast2-core-2.21.4/libycp/src/YExpression.cc 2011-06-16 14:49:31.000000000 +0200 @@ -1500,10 +1500,11 @@ YCPValue expr = m_expr->evaluate (); - if (expr.isNull ()) + if (expr.isNull () || expr->isVoid()) { - ycp2error ("Condition expression evaluates to nil in ?: expression"); - return YCPNull (); + extern ExecutionEnvironment ee; + ycp2warning (ee.filename().c_str(), ee.linenumber(), "Condition expression evaluates to nil in ?: expression, using false instead."); + return m_false->evaluate (); } if (expr->isBoolean()) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-core-2.21.3/libycp/src/YStatement.cc new/yast2-core-2.21.4/libycp/src/YStatement.cc --- old/yast2-core-2.21.3/libycp/src/YStatement.cc 2011-05-27 09:37:22.000000000 +0200 +++ new/yast2-core-2.21.4/libycp/src/YStatement.cc 2011-06-15 17:01:10.000000000 +0200 @@ -1047,9 +1047,10 @@ if (!bval->isBoolean()) { - ycp2error ("'if (%s)' evaluates to non-boolean '%s' (%s).", m_condition->toString().c_str(), bval->toString().c_str(), bval->valuetype_str()); + ycp2warning (ee.filename().c_str(), ee.linenumber(), "'if (%s)' evaluates to non-boolean '%s' (%s), using 'false' instead.", m_condition->toString().c_str(), bval->toString().c_str(), bval->valuetype_str()); + bval = YCPBoolean (false); } - else if (bval->asBoolean()->value() == true) + if (bval->asBoolean()->value() == true) { if (m_true != 0) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-core-2.21.3/libycp/testsuite/tests/builtin/Builtin-Boolean.err new/yast2-core-2.21.4/libycp/testsuite/tests/builtin/Builtin-Boolean.err --- old/yast2-core-2.21.3/libycp/testsuite/tests/builtin/Builtin-Boolean.err 2010-02-02 11:57:21.000000000 +0100 +++ new/yast2-core-2.21.4/libycp/testsuite/tests/builtin/Builtin-Boolean.err 2011-06-17 15:45:50.000000000 +0200 @@ -82,3 +82,27 @@ ---------------------------------------------------------------------- (false || false) ---------------------------------------------------------------------- +Parsed: +---------------------------------------------------------------------- +(nil || true) +---------------------------------------------------------------------- +[Interpreter] tests/builtin/Builtin-Boolean.ycp:0 First operand of '||' evaluates to nil, using 'false' instead. +Parsed: +---------------------------------------------------------------------- +(true || nil) +---------------------------------------------------------------------- +Parsed: +---------------------------------------------------------------------- +(false || nil) +---------------------------------------------------------------------- +[Interpreter] tests/builtin/Builtin-Boolean.ycp:0 Second operand of '||' evaluates to nil, using 'false' instead. +Parsed: +---------------------------------------------------------------------- +(nil && true) +---------------------------------------------------------------------- +[Interpreter] tests/builtin/Builtin-Boolean.ycp:0 First operand of '&&' evaluates to nil, using 'false' instead. +Parsed: +---------------------------------------------------------------------- +(true && nil) +---------------------------------------------------------------------- +[Interpreter] tests/builtin/Builtin-Boolean.ycp:0 Second operand of '&&' evaluates to nil, using 'false' instead. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-core-2.21.3/libycp/testsuite/tests/builtin/Builtin-Boolean.out new/yast2-core-2.21.4/libycp/testsuite/tests/builtin/Builtin-Boolean.out --- old/yast2-core-2.21.3/libycp/testsuite/tests/builtin/Builtin-Boolean.out 2010-02-02 11:57:21.000000000 +0100 +++ new/yast2-core-2.21.4/libycp/testsuite/tests/builtin/Builtin-Boolean.out 2011-06-17 15:45:44.000000000 +0200 @@ -19,3 +19,8 @@ (true) (true) (false) +(true) +(true) +(false) +(false) +(false) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-core-2.21.3/libycp/testsuite/tests/builtin/Builtin-Boolean.ycp new/yast2-core-2.21.4/libycp/testsuite/tests/builtin/Builtin-Boolean.ycp --- old/yast2-core-2.21.3/libycp/testsuite/tests/builtin/Builtin-Boolean.ycp 2010-02-02 11:57:21.000000000 +0100 +++ new/yast2-core-2.21.4/libycp/testsuite/tests/builtin/Builtin-Boolean.ycp 2011-06-17 15:42:33.000000000 +0200 @@ -39,3 +39,8 @@ (false || true) (false || false) +(nil || true) +(true || nil) +(false || nil) +(nil && true) +(true && nil) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-core-2.21.3/libycp/testsuite/tests/expressions/Triple2.err new/yast2-core-2.21.4/libycp/testsuite/tests/expressions/Triple2.err --- old/yast2-core-2.21.3/libycp/testsuite/tests/expressions/Triple2.err 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-core-2.21.4/libycp/testsuite/tests/expressions/Triple2.err 2011-06-17 15:38:26.000000000 +0200 @@ -0,0 +1,10 @@ +Parsed: +---------------------------------------------------------------------- +{ + // boolean b + // filename: "tests/expressions/Triple2.ycp" + boolean b = nil; + return b ? 1 : 2; +} +---------------------------------------------------------------------- +[Interpreter] tests/expressions/Triple2.ycp:4 Condition expression evaluates to nil in ?: expression, using false instead. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-core-2.21.3/libycp/testsuite/tests/expressions/Triple2.out new/yast2-core-2.21.4/libycp/testsuite/tests/expressions/Triple2.out --- old/yast2-core-2.21.3/libycp/testsuite/tests/expressions/Triple2.out 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-core-2.21.4/libycp/testsuite/tests/expressions/Triple2.out 2011-06-17 15:35:04.000000000 +0200 @@ -0,0 +1 @@ +(2) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-core-2.21.3/libycp/testsuite/tests/expressions/Triple2.ycp new/yast2-core-2.21.4/libycp/testsuite/tests/expressions/Triple2.ycp --- old/yast2-core-2.21.3/libycp/testsuite/tests/expressions/Triple2.ycp 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-core-2.21.4/libycp/testsuite/tests/expressions/Triple2.ycp 2011-06-17 15:35:13.000000000 +0200 @@ -0,0 +1,5 @@ +{ + // nil variable evaluates as fals + boolean b = nil; + return (b ? 1 : 2); +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-core-2.21.3/libycp/testsuite/tests/statements/If4.err new/yast2-core-2.21.4/libycp/testsuite/tests/statements/If4.err --- old/yast2-core-2.21.3/libycp/testsuite/tests/statements/If4.err 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-core-2.21.4/libycp/testsuite/tests/statements/If4.err 2011-06-17 15:57:11.000000000 +0200 @@ -0,0 +1,43 @@ +Parsed: +---------------------------------------------------------------------- +{ + // boolean b + // filename: "tests/statements/If4.ycp" + boolean b = nil; + if (b) + { + return 1; +} +else + { + return 2; +} + return 3; +} +---------------------------------------------------------------------- +[Interpreter] tests/statements/If4.ycp:3 'if (b)' evaluates to non-boolean 'nil' (VOID), using 'false' instead. +Parsed: +---------------------------------------------------------------------- +{ + // boolean boolean_returing_function () + // filename: "tests/statements/If4.ycp" + boolean boolean_returing_function () +{ + // boolean ret + boolean ret = nil; + return ret; +} + if (boolean_returing_function ()) + { + return 1; +} +else + { + return 2; +} +} +---------------------------------------------------------------------- +[Interpreter] tests/statements/If4.ycp:18 'if (boolean_returing_function ())' evaluates to non-boolean 'nil' (RETURN), using 'false' instead. +[Parser] tests/statements/If4.ycp:29 'if' expression not boolean +[Parser] tests/statements/If4.ycp:29 Expected 'boolean', seen 'const void'. +runycp: parser error diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-core-2.21.3/libycp/testsuite/tests/statements/If4.out new/yast2-core-2.21.4/libycp/testsuite/tests/statements/If4.out --- old/yast2-core-2.21.3/libycp/testsuite/tests/statements/If4.out 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-core-2.21.4/libycp/testsuite/tests/statements/If4.out 2011-06-17 15:57:12.000000000 +0200 @@ -0,0 +1,2 @@ +(2) +(2) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-core-2.21.3/libycp/testsuite/tests/statements/If4.ycp new/yast2-core-2.21.4/libycp/testsuite/tests/statements/If4.ycp --- old/yast2-core-2.21.3/libycp/testsuite/tests/statements/If4.ycp 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-core-2.21.4/libycp/testsuite/tests/statements/If4.ycp 2011-06-17 15:54:57.000000000 +0200 @@ -0,0 +1,34 @@ +{ + boolean b = nil; + if (b) + { + return 1; + } + else + { + return 2; + } + return 3; // should not happen +} +{ + boolean boolean_returing_function () { + boolean ret = nil; + return ret; + } + if (boolean_returing_function ()) + { + return 1; + } + else + { + return 2; + } +} +{ + // this is real parse error + if (nil) + return 1; + return 2; +} + + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
