Skip to content

Commit f4a1479

Browse files
authored
sentence about semantics
1 parent 783cee3 commit f4a1479

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/language/ql-spec/language.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1177,7 +1177,9 @@ Set literals denote a choice from a collection of values.
11771177

11781178
setliteral ::= "[" expr ("," expr)* "]"
11791179

1180-
Set literals can be of any type, but the types within a set literal have to be consistent according to the following criterion: At least one of the set elements has to be of a type that is a supertype of all the set element types. This supertype is the type of the set literal. For example, ``float`` is a supertype of ``float`` and ``int``, therefore ``x = [4, 5.6]`` is valid. On the other hand, ``y = [5, "test"]`` does not adhere to the criterion.
1180+
Set literals can be of any type, but the types within a set literal have to be consistent according to the following criterion: At least one of the set elements has to be of a type that is a supertype of all the set element types. This supertype is the type of the set literal. For example, ``float`` is a supertype of ``float`` and ``int``, therefore ``x = [4, 5.6]`` is valid. On the other hand, ``y = [5, "test"]`` does not adhere to the criterion.
1181+
1182+
The values of a set literal expression are all the values of all the contained element expressions.
11811183

11821184
Disambiguation of expressions
11831185
-----------------------------

0 commit comments

Comments
 (0)