isSet property
bool
get
isSet
Return true
if this literal represents a set literal.
This getter will always return false
if isMap returns true
.
However, this getter is not the inverse of isMap. It is possible for
both getters to return false
if
- the AST has not been resolved (because determining the kind of the literal is done during resolution),
- the literal is ambiguous (contains one or more spread elements and none of those elements can be used to determine the kind of the literal), or
- the literal is invalid because it contains both expressions (for sets) and map entries (for maps).
In both of the latter two cases there will be compilation errors associated with the literal.
Implementation
bool get isSet;