@@ -1091,22 +1091,14 @@ to a form that the corresponding constructor on the macro class expects, which
10911091it specifies through parameter types:
10921092
10931093* If the parameter type is ` bool ` , ` double ` , ` int ` , ` Null ` , ` num ` , ` String ` ,
1094- ` List ` , ` Set ` , or ` Map ` , (or the nullable forms of any of those), then the
1095- argument expression must be a boolean, number, null, string, list, set, or
1096- map literal.
1097-
1098- * Number literals may be negated.
1099- * String literals may not contain any interpolation, but may be adjacent
1100- strings, and may be raw strings.
1101- * List, Set and Map literals may only contain entries matching any of the
1102- supported argument types. If the parameter type specifies a generic type
1103- argument, it must be one of the allowed parameter types or ` Object ` ,
1104- recursively. Note that ` Object ` is allowed in order to exclude null items,
1105- but all the actual entries must be of one of the supported types.
1106-
1107- ** TODO** : Do we want to allow more complex expressions? Could we allow
1108- constant expressions whose identifiers can be successfully resolved before
1109- macro expansion (#1929 )?
1094+ ` List ` , ` Set ` , ` Map ` , ` Object ` , or ` dynamic ` (or the nullable forms of any
1095+ of those), then the argument expression must be a constant expression
1096+ containing only boolean, number, null, string, list, set, or map literals.
1097+ Note that ` Object ` and ` dynamic ` are allowed as types but the actual values
1098+ must still be of one of the supported types.
1099+
1100+ * Any type arguments (inferred or explicit) must be one of the allowed
1101+ parameter types, recursively.
11101102
11111103* If the parameter type is ` Code ` (or a subtype of ` Code ` ), the argument
11121104 expression is automatically converted to a corresponding ` Code ` instance.
0 commit comments