Skip to content

Commit 117d1b7

Browse files
eernstgcommit-bot@chromium.org
authored andcommitted
Adjust test to allow type variable as expression
This CL adjusts the test language/constants_2018/constant_types_test such that it expects no error when a type variable is used as a potentially constant expression. This feature was added for consistency as part of the constructor- tearoffs feature bundle (because it can now be expressed anyway). Change-Id: I5b58f2439699b24e3e3036cb0e3a0fcc9430d4c0 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214644 Reviewed-by: Johnni Winther <[email protected]> Commit-Queue: Erik Ernst <[email protected]>
1 parent 091338d commit 117d1b7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/language/constants_2018/constant_types_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
// Tests that in some positions only constant types are allowed, so not
66
// type parameters. But in other positions potentially constant types are
7-
// allowed, so type parameters.
7+
// allowed, including type parameters.
88

99
import "package:expect/expect.dart";
1010

@@ -24,7 +24,7 @@ class T<X> {
2424
;
2525
const T.test4()
2626
: value = null //
27-
?? X //# 04: compile-time error
27+
?? X //# 04: ok
2828
;
2929
}
3030

0 commit comments

Comments
 (0)