Skip to content
This repository was archived by the owner on Apr 8, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

* Imports are prefixed with `_i1` rather than `_1` which satisfies the lint
`lowercase_with_underscores`.
* `literalList` accepts an `Iterable` argument.

## 2.1.0

Expand Down
4 changes: 2 additions & 2 deletions lib/src/specs/expression/literal.dart
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ Expression literalString(String value, {bool raw: false}) {
}

/// Creates a literal list expression from [values].
LiteralListExpression literalList(List<Object> values, [Reference type]) {
return new LiteralListExpression._(false, values, type);
LiteralListExpression literalList(Iterable<Object> values, [Reference type]) {
return new LiteralListExpression._(false, values.toList(), type);
}

/// Creates a literal `const` list expression from [values].
Expand Down