Skip to content

Commit e40ae3b

Browse files
lrhncommit-bot@chromium.org
authored andcommitted
Add missing @SInCE markers on unmodifiable set additions.
Change-Id: I84e94736a425d45b6b1334e90f7991fa31070713 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176240 Commit-Queue: Lasse R.H. Nielsen <[email protected]> Reviewed-by: Kevin Moore <[email protected]> Auto-Submit: Lasse R.H. Nielsen <[email protected]>
1 parent 56fb42c commit e40ae3b

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
ERROR|COMPILE_TIME_ERROR|CONST_CONSTRUCTOR_THROWS_EXCEPTION|lib/core/core.dart|3679|5|94|Const constructors can't throw exceptions.
2-
ERROR|COMPILE_TIME_ERROR|CONST_CONSTRUCTOR_THROWS_EXCEPTION|lib/core/core.dart|7887|5|97|Const constructors can't throw exceptions.
2+
ERROR|COMPILE_TIME_ERROR|CONST_CONSTRUCTOR_THROWS_EXCEPTION|lib/core/core.dart|7888|5|97|Const constructors can't throw exceptions.
33
ERROR|COMPILE_TIME_ERROR|CONST_CONSTRUCTOR_THROWS_EXCEPTION|lib/core/core.dart|893|5|95|Const constructors can't throw exceptions.
44
ERROR|COMPILE_TIME_ERROR|CONST_CONSTRUCTOR_THROWS_EXCEPTION|lib/core/core.dart|926|5|94|Const constructors can't throw exceptions.
55
ERROR|COMPILE_TIME_ERROR|INVALID_ASSIGNMENT|lib/_internal/js_dev_runtime/private/interceptors.dart|1358|18|27|A value of type 'double' can't be assigned to a variable of type 'int'.
66
ERROR|COMPILE_TIME_ERROR|RETURN_OF_INVALID_TYPE|lib/_internal/js_dev_runtime/private/interceptors.dart|1225|14|38|A value of type 'double' can't be returned from method '%' because it has a return type of 'JSNumber'.
77
ERROR|COMPILE_TIME_ERROR|RETURN_OF_INVALID_TYPE|lib/_internal/js_dev_runtime/private/interceptors.dart|1227|14|38|A value of type 'double' can't be returned from method '%' because it has a return type of 'JSNumber'.
88
ERROR|SYNTACTIC_ERROR|CONST_FACTORY|lib/core/core.dart|3677|3|5|Only redirecting factory constructors can be declared to be 'const'.
9-
ERROR|SYNTACTIC_ERROR|CONST_FACTORY|lib/core/core.dart|7885|3|5|Only redirecting factory constructors can be declared to be 'const'.
9+
ERROR|SYNTACTIC_ERROR|CONST_FACTORY|lib/core/core.dart|7886|3|5|Only redirecting factory constructors can be declared to be 'const'.
1010
ERROR|SYNTACTIC_ERROR|CONST_FACTORY|lib/core/core.dart|891|3|5|Only redirecting factory constructors can be declared to be 'const'.
1111
ERROR|SYNTACTIC_ERROR|CONST_FACTORY|lib/core/core.dart|924|3|5|Only redirecting factory constructors can be declared to be 'const'.

sdk/lib/collection/set.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,7 @@ class _UnmodifiableSet<E> extends _SetBase<E> with _UnmodifiableSetMixin<E> {
400400
///
401401
/// Methods that could change the set, such as [add] and [remove],
402402
/// must not be called.
403+
@Since("2.12")
403404
class UnmodifiableSetView<E> extends SetBase<E> with _UnmodifiableSetMixin<E> {
404405
final Set<E> _source;
405406

sdk/lib/core/set.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ abstract class Set<E> extends EfficientLengthIterable<E> {
9696
* The new set behaves like the result of [Set.of],
9797
* except that the set returned by this constructor is not modifiable.
9898
*/
99+
@Since("2.12")
99100
factory Set.unmodifiable(Iterable<E> elements) =>
100101
UnmodifiableSetView<E>(<E>{...elements});
101102

0 commit comments

Comments
 (0)