Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:23
erlang
2747-Correct-wording-about-filters-in-comprehen...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 2747-Correct-wording-about-filters-in-comprehensions.patch of Package erlang
From bd5a14e074efccab87b65ffb7f52f1599d82aaea Mon Sep 17 00:00:00 2001 From: ilya-klyuchnikov <ilya.klyuchnikov@gmail.com> Date: Thu, 2 Dec 2021 08:26:14 +0000 Subject: [PATCH] Correct wording about filters in comprehensions The previous wording may result into false impression that the compiler performs checks to ensure that a filter is "well-formed", while the filter is checked at runtime. Fixes #5470. --- system/doc/reference_manual/expressions.xml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/system/doc/reference_manual/expressions.xml b/system/doc/reference_manual/expressions.xml index 0b0b6e3652..956775d7e8 100644 --- a/system/doc/reference_manual/expressions.xml +++ b/system/doc/reference_manual/expressions.xml @@ -1575,7 +1575,11 @@ end</pre> <c>BitStringExpr</c> must be an expression, which evaluates to a bitstring.</item> <item>A <em>filter</em> is an expression, which evaluates to - <c>true</c> or <c>false</c>.</item> + <c>true</c> or <c>false</c>, or a + <seeguide marker="#guard_expressions">guard expression</seeguide>. + If the filter is not a guard expression and evaluates + to a non-Boolean value <c>Val</c>, an exception + <c>{bad_filter, Val}</c> is triggered at runtime.</item> </list> <p>The variables in the generator patterns shadow previously bound variables, including variables bound in a previous generator pattern.</p> @@ -1626,8 +1630,12 @@ end</pre> <c><![CDATA[BitstringPattern <= BitStringExpr]]></c>. <br></br> <c>BitStringExpr</c> must be an expression that evaluates to a bitstring.</item> - <item>A <em>filter</em> is an expression that evaluates to - <c>true</c> or <c>false</c>.</item> + <item>A <em>filter</em> is an expression, which evaluates to + <c>true</c> or <c>false</c>, or a + <seeguide marker="#guard_expressions">guard expression</seeguide>. + If the filter is not a guard expression and evaluates + to a non-Boolean value <c>Val</c>, an exception + <c>{bad_filter, Val}</c> is triggered at runtime.</item> </list> <p>The variables in the generator patterns shadow previously bound variables, including variables bound in a previous generator pattern.</p> -- 2.31.1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor