diff --git a/docs/language/dartLangSpec.tex b/docs/language/dartLangSpec.tex index 50b6c778793a..d717980b38f3 100644 --- a/docs/language/dartLangSpec.tex +++ b/docs/language/dartLangSpec.tex @@ -29,6 +29,7 @@ % - The Null type is now considered a subtype of all types in most cases. % - Specify what NEWLINE means in multiline strings. % - Specified the FutureOf type. +% - Asserts can occur in initializer lists. % % 1.14 % - The call "C()" where "C" is a class name, is a now compile-time error. @@ -1404,13 +1405,14 @@ \subsubsection{Generative Constructors} \begin{grammar} {\bf initializers:} - `{\escapegrammar :}' superCallOrFieldInitializer (`,' superCallOrFieldInitializer)* + `{\escapegrammar :}' initializerListEntry (`,' initializerListEntry)* . -{\bf superCallOrFieldInitializer:}\SUPER{} arguments; +{\bf initializerListEntry:}\SUPER{} arguments; \SUPER{} `{\escapegrammar .}' identifier arguments; - fieldInitializer + fieldInitializer; + assertion . {\bf fieldInitializer:} @@ -1519,6 +1521,9 @@ \subsubsection{Generative Constructors} \LMHash{} An initializer of the form \code{$v$ = $e$} is equivalent to an initializer of the form \code{\THIS{}.$v$ = $e$}. +\LMHash{} +Execution of an initializer that is an assertion proceeds by executing the assertion (\ref{assert}). + \LMHash{} Execution of a superinitializer of the form @@ -2623,6 +2628,7 @@ \subsection{Constants} \LMHash{} It is a compile-time error if an expression is required to be a constant expression but its evaluation would throw an exception. +It is a compile-time error if an assertion is part of a compile-time constant constructor invocation and the assertion would throw an exception. % so, checked mode? analyzers? editor/development compilers? \commentary{ @@ -6739,24 +6745,41 @@ \subsection{ Assert} \begin{grammar} {\bf assertStatement:} - assert `(' expression ( `,' expression )? `,'? `)' `{\escapegrammar ;}' - . + assertion `{\escapegrammar ;}' + . +{\bf assertion:} + \ASSERT{} `(' expression ( `,' expression )? `,'? `)' + . \end{grammar} \LMHash{} The grammar allows a trailing comma before the closing parenthesis, similarly to an argument list. That comma, if present, has no effect. -An assert statement with a trailing comme is equivalent to one with that +An assertion with a trailing comme is equivalent to one with that comma removed. \LMHash{} -An assert statement on the form \code{\ASSERT($e$);)} is equivalent to a statment on the form \code{\ASSERT($e$, null);}. +An assertion on the form \code{\ASSERT($e$))} is equivalent to an assertion +on the form \code{\ASSERT($e$, null)}. + +\LMHash{} +Execution of an assert statement executes the assertion as described below +and completes in the same way as the assertion. \LMHash{} -The assert statement has no effect in production mode. In checked mode, execution of an assert statement \code{\ASSERT{}($c$, $e$);} proceeds as follows: +In production mode the assertion has no effect +and its execution immediately completes normally (\ref{completion}). +In checked mode, +execution of an assertion \code{\ASSERT{}($c$, $e$)} proceeds as follows: \LMHash{} -The expression $c$ is evaluated to an object $o$. If the class of $o$ is a subtype of \code{Function} then let $r$ be the result of invoking $o$ with no arguments. Otherwise, let $r$ be $o$. +The expression $c$ is evaluated to an object $o$. +If the class of $o$ is not a subtype of \code{Function} then +let $r$ be $o$. +Otherwise, +if the assertion occurs in the initializer list of a \CONST{} constructor, +then we say that the assertion failed, +otherwise let $r$ be the result of invoking $o$ with no arguments. It is a dynamic type error if $o$ is not of type \code{bool} or of type \code{Function}, or if $r$ is not of type \code{bool}. If $r$ is \FALSE{}, we say that the assertion failed. If $r$ is \TRUE{}, we say that the assertion succeeded. @@ -6765,7 +6788,9 @@ \subsection{ Assert} Then the execution of the assert statement throws (\ref{completion}) an \code{AssertionError} containing $m$ and with a stack trace corresponding to the current execution state at the \ASSERT{} statement. \LMHash{} -It is a static type warning if the type of $e$ may not be assigned to either \code{bool} or $() \rightarrow$ \code{bool}. +It is a static type warning if the type of $e$ may not be assigned to either +\code{bool} or $() \rightarrow$ \code{bool}. +If the assertion occurs in a \CONST{} constructor initializer list, it is a static type warning if the type of $e$ may not be assigned to \code{bool}. \rationale{Why is this a statement, not a built in function call? Because it is handled magically so it has no effect and no overhead in production mode. Also, in the absence of final methods. one could not prevent it being overridden (though there is no real harm in that). It cannot be viewed as a function call that is being optimized away because the argument might have side effects. } diff --git a/pkg/analyzer/lib/source/embedder.dart b/pkg/analyzer/lib/source/embedder.dart index f09ec1bf06e2..a0ff02424a6e 100644 --- a/pkg/analyzer/lib/source/embedder.dart +++ b/pkg/analyzer/lib/source/embedder.dart @@ -1,4 +1,4 @@ -// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file +q// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. diff --git a/tests/language/assertion_initializer_const_error2_test.dart b/tests/language/assertion_initializer_const_error2_test.dart new file mode 100644 index 000000000000..a58ff670e1c0 --- /dev/null +++ b/tests/language/assertion_initializer_const_error2_test.dart @@ -0,0 +1,64 @@ +// Copyright (c) 201, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. +// VMOptions=--assert_initializer +// +// Dart test program testing assert statements. + +import "package:expect/expect.dart"; + +class C { + final int x; + // Const constructors. + const C.cc01(this.x, y) + : assert(x < y) //# cc01: compile-time error + ; + const C.cc02(x, y) : x = x, + assert(x < y) //# cc02: compile-time error + ; + const C.cc03(x, y) : + assert(x < y), //# cc03: compile-time error + x = x; + const C.cc04(this.x, y) : super() + , assert(x < y) //# cc04: compile-time error + ; + const C.cc05(this.x, y) : + assert(x < y), //# cc05: compile-time error + super(); + const C.cc06(x, y) : x = x, super() + , assert(x < y) //# cc06: compile-time error + ; + const C.cc07(x, y) : + assert(x < y), //# cc07: compile-time error + super(), x = x; + const C.cc08(x, y) : + assert(x < y), //# cc08: compile-time error + super(), x = x + , assert(y > x) //# cc08: continued + ; + const C.cc09(this.x, y) + : assert(x < y, "$x < $y") //# cc09: compile-time error + ; + const C.cc10(this.x, y) + : assert(x < y,) //# cc10: compile-time error + ; + const C.cc11(this.x, y) + : assert(x < y, "$x < $y",) //# cc11: compile-time error + ; +} + + +main() { + // Failing assertions in const invociations are compile-time errors. + const C.cc01(2, 1); //# cc01: compile-time error + const C.cc02(2, 1); //# cc02: compile-time error + const C.cc03(2, 1); //# cc03: compile-time error + const C.cc04(2, 1); //# cc04: compile-time error + const C.cc05(2, 1); //# cc05: compile-time error + const C.cc06(2, 1); //# cc06: compile-time error + const C.cc07(2, 1); //# cc07: compile-time error + const C.cc08(2, 1); //# cc08: compile-time error + const C.cc09(2, 1); //# cc09: compile-time error + const C.cc10(2, 1); //# cc10: compile-time error + const C.cc11(2, 1); //# cc11: compile-time error +} diff --git a/tests/language/assertion_initializer_const_error_test.dart b/tests/language/assertion_initializer_const_error_test.dart new file mode 100644 index 000000000000..896fee9ad22d --- /dev/null +++ b/tests/language/assertion_initializer_const_error_test.dart @@ -0,0 +1,20 @@ +// Copyright (c) 201, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. +// VMOptions=--assert_initializer + +class C { + static bool check(x, y) => x < y; + final int x; + const C(this.x); + // The expression is not a potentially constant expression. + // This is a compile-time error even in production mode. + const C.bc03(this.x, y) + : assert(check(x, y)) //# 01: compile-time error + ; +} + +main() { + var c = new C.bc03(1, 2); + if (c.x != 1) throw "non-trivial use of c"; +} diff --git a/tests/language/assertion_initializer_const_function_error_test.dart b/tests/language/assertion_initializer_const_function_error_test.dart new file mode 100644 index 000000000000..d1506731c20c --- /dev/null +++ b/tests/language/assertion_initializer_const_function_error_test.dart @@ -0,0 +1,29 @@ +// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. +// VMOptions=--assert_initializer +// +// Dart test program testing assert statements. + +import "package:expect/expect.dart"; + +class C { + static bool staticTrue() => true; + final int x; + const C(this.x); + // The expression *is* a compile-time constant, but not a bool value. + // Static warning, assertion throws which makes it a compile-time error. + const C.bc02(this.x, y) + : assert(staticTrue) //# 01: static type warning + ; +} + + +main() { + // Assertion fails, so in checked mode it's a compile-time error. + // Production mode will succeed because the assertion isn't evaluated. + var c = const C(1); + c = const C.bc02(1, 2); //# 01: compile-time error + if (c.x != 1) throw "non-trivial use of c"; + Expect.identical(const C(1), c); +} diff --git a/tests/language/assertion_initializer_const_function_test.dart b/tests/language/assertion_initializer_const_function_test.dart new file mode 100644 index 000000000000..9e3add18d4bd --- /dev/null +++ b/tests/language/assertion_initializer_const_function_test.dart @@ -0,0 +1,29 @@ +// Copyright (c) 201, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. +// VMOptions=--assert_initializer +// +// Dart test program testing assert statements. + +import "package:expect/expect.dart"; + +class C { + static bool staticTrue() => true; + final int x; + const C(this.x); + // The expression *is* compile-time constant, but not a bool value. + // Static warning, runtime always fails assertion. + const C.bc01(this.x, y) + : assert(staticTrue) //# 01: static type warning + ; +} + +main() { + bool checkedMode = false; + assert(checkedMode = true); + if (checkedMode) { + Expect.throws(() => new C.bc01(1, 2), (e) => e is AssertionError); + } else { + Expect.equals(1, new C.bc01(1, 2).x); + } +} diff --git a/tests/language/assertion_initializer_test.dart b/tests/language/assertion_initializer_test.dart new file mode 100644 index 000000000000..45369802b96b --- /dev/null +++ b/tests/language/assertion_initializer_test.dart @@ -0,0 +1,140 @@ +// Copyright (c) 201, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. +// VMOptions=--assert_initializer +// +// Dart test program testing assert statements. + +import "package:expect/expect.dart"; + +class C { + static bool check(x, y) => x < y; + static bool staticTrue() => true; + final int x; + const C(this.x); + + C.c01(this.x, y) : assert(x < y); + C.c02(x, y) : x = x, assert(x < y); + C.c03(x, y) : assert(x < y), x = x; + C.c04(this.x, y) : super(), assert(x < y); + C.c05(this.x, y) : assert(x < y), super(); + C.c06(x, y) : x = x, super(), assert(x < y); + C.c07(x, y) : assert(x < y), super(), x = x; + C.c08(x, y) : assert(x < y), super(), x = x, assert(y > x); + C.c09(this.x, y) : assert(x < y, "$x < $y"); + C.c10(this.x, y) : assert(x < y,); + C.c11(this.x, y) : assert(x < y, "$x < $y",); + + const C.cc01(this.x, y) : assert(x < y); + const C.cc02(x, y) : x = x, assert(x < y); + const C.cc03(x, y) : assert(x < y), x = x; + const C.cc04(this.x, y) : super(), assert(x < y); + const C.cc05(this.x, y) : assert(x < y), super(); + const C.cc06(x, y) : x = x, super(), assert(x < y); + const C.cc07(x, y) : assert(x < y), super(), x = x; + const C.cc08(x, y) : assert(x < y), super(), x = x, assert(y > x); + const C.cc09(this.x, y) : assert(x < y, "$x < $y"); + const C.cc10(this.x, y) : assert(x < y,); + const C.cc11(this.x, y) : assert(x < y, "$x < $y",); + + C.nc01(this.x, y) : assert(check(x, y)); + C.nc02(x, y) : x = x, assert(check(x, y)); + C.nc03(x, y) : assert(check(x, y)), x = x; + C.nc04(this.x, y) : super(), assert(check(x, y)); + C.nc05(this.x, y) : assert(check(x, y)), super(); + C.nc06(x, y) : x = x, super(), assert(check(x, y)); + C.nc07(x, y) : assert(check(x, y)), super(), x = x; + C.nc08(x, y) : assert(check(x, y)), super(), x = x, assert(y > x); + C.nc09(this.x, y) : assert(check(x, y), "$x < $y"); + C.nc10(this.x, y) : assert(check(x, y),); + C.nc11(this.x, y) : assert(check(x, y), "$x < $y",); + + C.fc01(this.x, y) : assert(() => x < y); + C.fc02(x, y) : x = x, assert(() => x < y); + C.fc03(x, y) : assert(() => x < y), x = x; + C.fc04(this.x, y) : super(), assert(() => x < y); + C.fc05(this.x, y) : assert(() => x < y), super(); + C.fc06(x, y) : x = x, super(), assert(() => x < y); + C.fc07(x, y) : assert(() => x < y), super(), x = x; + C.fc08(x, y) : assert(() => x < y), super(), x = x, assert(y > x); + C.fc09(this.x, y) : assert(() => x < y, "$x < $y"); + C.fc10(this.x, y) : assert(() => x < y,); + C.fc11(this.x, y) : assert(() => x < y, "$x < $y",); +} + + +main() { + // Test all constructors with both succeeding and failing asserts. + test(1, 2); + test(2, 1); + + const c1 = const C(1); + + // Asserts do not affect canonization. + Expect.identical(c1, const C.cc01(1, 2)); + Expect.identical(c1, const C.cc02(1, 2)); + Expect.identical(c1, const C.cc03(1, 2)); + Expect.identical(c1, const C.cc04(1, 2)); + Expect.identical(c1, const C.cc05(1, 2)); + Expect.identical(c1, const C.cc06(1, 2)); + Expect.identical(c1, const C.cc07(1, 2)); + Expect.identical(c1, const C.cc08(1, 2)); + Expect.identical(c1, const C.cc09(1, 2)); + Expect.identical(c1, const C.cc10(1, 2)); + Expect.identical(c1, const C.cc11(1, 2)); +} + +void test(int x, int y) { + bool checkedMode = false; + assert(checkedMode = true); + + bool Function(C Function()) doTest = (checkedMode && x >= y) + ? (f) { Expect.throws(f, (e) => e is AssertionError); } + : (f) { Expect.equals(x, f().x); }; + + doTest(() => new C.c01(x, y)); + doTest(() => new C.c02(x, y)); + doTest(() => new C.c03(x, y)); + doTest(() => new C.c04(x, y)); + doTest(() => new C.c05(x, y)); + doTest(() => new C.c06(x, y)); + doTest(() => new C.c07(x, y)); + doTest(() => new C.c08(x, y)); + doTest(() => new C.c09(x, y)); + doTest(() => new C.c10(x, y)); + doTest(() => new C.c11(x, y)); + doTest(() => new C.cc01(x, y)); + doTest(() => new C.cc02(x, y)); + doTest(() => new C.cc03(x, y)); + doTest(() => new C.cc04(x, y)); + doTest(() => new C.cc05(x, y)); + doTest(() => new C.cc06(x, y)); + doTest(() => new C.cc07(x, y)); + doTest(() => new C.cc08(x, y)); + doTest(() => new C.cc09(x, y)); + doTest(() => new C.cc10(x, y)); + doTest(() => new C.cc11(x, y)); + doTest(() => new C.nc01(x, y)); + doTest(() => new C.nc02(x, y)); + doTest(() => new C.nc03(x, y)); + doTest(() => new C.nc04(x, y)); + doTest(() => new C.nc05(x, y)); + doTest(() => new C.nc06(x, y)); + doTest(() => new C.nc07(x, y)); + doTest(() => new C.nc08(x, y)); + doTest(() => new C.nc09(x, y)); + doTest(() => new C.nc10(x, y)); + doTest(() => new C.nc11(x, y)); + doTest(() => new C.fc01(x, y)); + doTest(() => new C.fc02(x, y)); + doTest(() => new C.fc03(x, y)); + doTest(() => new C.fc04(x, y)); + doTest(() => new C.fc05(x, y)); + doTest(() => new C.fc06(x, y)); + doTest(() => new C.fc07(x, y)); + doTest(() => new C.fc08(x, y)); + doTest(() => new C.fc09(x, y)); + doTest(() => new C.fc10(x, y)); + doTest(() => new C.fc11(x, y)); +} + diff --git a/tests/language/language.status b/tests/language/language.status index f803bf6a0794..f1f373038c26 100644 --- a/tests/language/language.status +++ b/tests/language/language.status @@ -8,9 +8,64 @@ [ $strong ] *: SkipByDesign # tests/language_strong has the strong mode versions of these tests. +[$compiler == precompiler && $runtime == dart_precompiled && !$checked] +assertion_initializer_const_error2_test/cc01: Pass, OK +assertion_initializer_const_error2_test/cc02: CompileTimeError +assertion_initializer_const_error2_test/cc03: Pass, OK +assertion_initializer_const_error2_test/cc04: Pass, OK +assertion_initializer_const_error2_test/cc05: Pass, OK +assertion_initializer_const_error2_test/cc06: Pass, OK +assertion_initializer_const_error2_test/cc07: Pass, OK +assertion_initializer_const_error2_test/cc08: Pass, OK +assertion_initializer_const_error2_test/cc09: Pass, OK +assertion_initializer_const_error2_test/cc10: Pass, OK +assertion_initializer_const_error2_test/cc11: Pass, OK +assertion_initializer_const_error2_test/none: CompileTimeError + +[$compiler == precompiler && $runtime == dart_precompiled && $checked] +assertion_initializer_const_error2_test/cc01: Pass +assertion_initializer_const_error2_test/cc03: Pass +assertion_initializer_const_error2_test/cc04: Pass +assertion_initializer_const_error2_test/cc05: Pass +assertion_initializer_const_error2_test/cc06: Pass +assertion_initializer_const_error2_test/cc07: Pass +assertion_initializer_const_error2_test/cc08: Pass +assertion_initializer_const_error2_test/cc09: Pass +assertion_initializer_const_error2_test/cc10: Pass +assertion_initializer_const_error2_test/cc11: Pass +assertion_initializer_const_error2_test/none: CompileTimeError +assertion_initializer_const_function_test/none: RuntimeError + +[$compiler == none && $runtime == vm && !$checked] +assertion_initializer_const_error2_test/cc02: MissingCompileTimeError +assertion_initializer_const_error_test/01: MissingCompileTimeError +assertion_initializer_const_function_error_test/01: MissingCompileTimeError + +[$compiler == none && $runtime == vm && $checked] +assertion_initializer_const_function_test/none: RuntimeError + +[$compiler == none && $runtime == drt && !$checked] +assertion_initializer_const_error2_test/cc02: Fail +assertion_initializer_const_error_test/01: Fail +assertion_initializer_const_function_error_test/01: Fail + +[$compiler == none && $runtime == drt && $checked] +assertion_initializer_const_function_test/none: RuntimeError + +[$compiler == none && $runtime == dartium && !$checked] +assertion_initializer_const_function_test/01: RuntimeError +assertion_initializer_test: RuntimeError + +[$compiler == none && $runtime == dartium && $checked] +assertion_initializer_const_function_test/01: RuntimeError +assertion_initializer_const_function_test/none: RuntimeError +assertion_initializer_test: RuntimeError + [ ($runtime == vm || $runtime == flutter || $runtime == dart_precompiled) && $compiler != dartk && $compiler != dartkp ] abstract_beats_arguments2_test/01: Crash # Issue 29171 +[ $runtime == vm || $runtime == dart_precompiled ] + # These test entries will be valid for vm/dartium (with and without kernel). [ $compiler == none || $compiler == app_jit || $compiler == dartk || $runtime == dart_precompiled ] async_star_cancel_while_paused_test: RuntimeError @@ -163,10 +218,26 @@ issue23244_test: Fail # Issue 23244 vm/regress_24517_test: Pass, Fail # Issue 24517. [ $compiler == precompiler && $runtime == dart_precompiled ] +assertion_initializer_const_error2_test/cc01: Crash, MissingCompileTimeError +assertion_initializer_const_error2_test/cc02: Crash, MissingCompileTimeError +assertion_initializer_const_error2_test/cc03: Crash, MissingCompileTimeError +assertion_initializer_const_error2_test/cc04: Crash, MissingCompileTimeError +assertion_initializer_const_error2_test/cc05: Crash, MissingCompileTimeError +assertion_initializer_const_error2_test/cc06: Crash, MissingCompileTimeError +assertion_initializer_const_error2_test/cc07: Crash, MissingCompileTimeError +assertion_initializer_const_error2_test/cc08: Crash, MissingCompileTimeError +assertion_initializer_const_error2_test/cc09: Crash, MissingCompileTimeError +assertion_initializer_const_error2_test/cc10: Crash, MissingCompileTimeError +assertion_initializer_const_error2_test/cc11: Crash, MissingCompileTimeError + vm/regress_27671_test: Skip # Unsupported export_double_same_main_test: Skip # Issue 29895 export_ambiguous_main_negative_test: Skip # Issue 29895 +[ $compiler == precompiler && $runtime == dart_precompiled && !$checked] +assertion_initializer_const_error_test/01: MissingCompileTimeError +assertion_initializer_const_function_error_test/01: MissingCompileTimeError + [ $compiler == precompiler && $runtime == dart_precompiled && $mode == debug ] regress_29025_test: Crash # Issue dartbug.com/29331 diff --git a/tests/language/language_analyzer2.status b/tests/language/language_analyzer2.status index c74ed832ff46..f2c3805cc823 100644 --- a/tests/language/language_analyzer2.status +++ b/tests/language/language_analyzer2.status @@ -3,6 +3,7 @@ # BSD-style license that can be found in the LICENSE file. [ $compiler == dart2analyzer ] + generic_methods_generic_function_parameter_test: CompileTimeError # Issue 28515 generic_local_functions_test: CompileTimeError # Issue 28515 @@ -451,3 +452,8 @@ part_refers_to_core_library_test/01: MissingCompileTimeError # Issue 29709 [ $compiler == dart2analyzer && $builder_tag == strong ] *: Skip # Issue 28649 + +[$compiler == dart2analyzer && $runtime == none && !$checked] +assertion_initializer_const_error2_test/none: CompileTimeError +assertion_initializer_const_function_test/01: CompileTimeError +assertion_initializer_test: CompileTimeError diff --git a/tests/language/language_dart2js.status b/tests/language/language_dart2js.status index b235e470a606..0a66558a5595 100644 --- a/tests/language/language_dart2js.status +++ b/tests/language/language_dart2js.status @@ -51,6 +51,22 @@ generic_function_typedef2_test/06: Crash # Issue 28214 stacktrace_demangle_ctors_test: Fail # dart2js stack traces are not always compliant. +assertion_initializer_const_error2_test/cc01: Crash +assertion_initializer_const_error2_test/cc02: Crash +assertion_initializer_const_error2_test/cc03: Crash +assertion_initializer_const_error2_test/cc04: Crash +assertion_initializer_const_error2_test/cc05: Crash +assertion_initializer_const_error2_test/cc06: Crash +assertion_initializer_const_error2_test/cc07: Crash +assertion_initializer_const_error2_test/cc08: Crash +assertion_initializer_const_error2_test/cc09: Crash +assertion_initializer_const_function_error_test/01: Crash +assertion_initializer_const_function_test/01: CompileTimeError +assertion_initializer_test: Crash + +[$compiler == dart2js && $runtime == d8 && $checked] +assertion_initializer_const_function_test/none: RuntimeError + [ $compiler == dart2js && $fast_startup ] const_evaluation_test/*: Fail # mirrors not supported deferred_constraints_constants_test/none: Fail # mirrors not supported diff --git a/tests/language/language_kernel.status b/tests/language/language_kernel.status index b72732dc7216..726ae1a5b54d 100644 --- a/tests/language/language_kernel.status +++ b/tests/language/language_kernel.status @@ -2,6 +2,35 @@ # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. +[$compiler == dartk && $runtime == vm] +assertion_initializer_const_error2_test/none: CompileTimeError +assertion_initializer_const_function_error_test/01: MissingCompileTimeError +assertion_initializer_test: CompileTimeError + +[$compiler == dartk && $runtime == vm && !$checked] +assertion_initializer_const_error2_test/cc02: MissingCompileTimeError + +[$compiler == dartk && $runtime == vm && $checked] +assertion_initializer_const_function_test/01: RuntimeError +assertion_initializer_const_function_test/none: RuntimeError + +[$compiler == dartkp && $runtime == dart_precompiled] +assertion_initializer_const_error2_test/none: CompileTimeError + +[$compiler == dartkp && $runtime == dart_precompiled && !$checked] +assertion_initializer_const_error2_test/cc02: MissingCompileTimeError +assertion_initializer_const_function_error_test/01: MissingCompileTimeError +assertion_initializer_test: CompileTimeError + +[$compiler == dartkp && $runtime == dart_precompiled && $checked] +assertion_initializer_const_error2_test/cc02: Crash +assertion_initializer_const_error_test/none: Crash +assertion_initializer_const_function_error_test/01: Crash +assertion_initializer_const_function_error_test/none: Crash +assertion_initializer_const_function_test/01: Crash +assertion_initializer_const_function_test/none: Crash +assertion_initializer_test: CompileTimeError + [ !$checked && ($compiler == dartk || $compiler == dartkp) ] deferred_constraints_type_annotation_test/type_annotation1: CompileTimeError # Fasta/KernelVM bug: Deferred loading kernel issue 28335.