Files
sdk/tests/compiler/dart2js/annotations/data/errors.dart
T
Joshua Litt b69e1fd96f [dart2js] Manually opt out tests/compilers/dart2js*.
Change-Id: I6a8a20e9ae58a56bd7e99a714ab94e73cae2f315
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140252
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2020-03-21 16:12:36 +00:00

84 lines
2.7 KiB
Dart

// Copyright (c) 2019, 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.
// @dart = 2.7
main() {
unknown();
noInlineField;
tryInlineField;
noThrowsWithoutNoInline();
noSideEffectsWithoutNoInline();
asConflict1();
asConflict2();
parameterConflict1();
parameterConflict2();
downcastConflict1();
downcastConflict2();
typesConflict1();
typesConflict2();
}
@pragma('dart2js:unknown')
/*error: [Unknown dart2js pragma @pragma('dart2js:unknown')]*/
unknown() {}
@pragma('dart2js:noInline')
var
/*error: [@pragma('dart2js:noInline') annotation is only supported for methods and constructors.]*/
noInlineField;
@pragma('dart2js:tryInline')
var
/*error: [@pragma('dart2js:tryInline') annotation is only supported for methods and constructors.]*/
tryInlineField;
@pragma('dart2js:noThrows')
/*error: [@pragma('dart2js:noThrows') should always be combined with @pragma('dart2js:noInline').]*/
noThrowsWithoutNoInline() {}
@pragma('dart2js:noSideEffects')
/*error: [@pragma('dart2js:noSideEffects') should always be combined with @pragma('dart2js:noInline').]*/
noSideEffectsWithoutNoInline() {}
@pragma('dart2js:as:trust')
@pragma('dart2js:as:check')
/*error: [@pragma('dart2js:as:check') must not be used with @pragma('dart2js:as:trust').]*/
asConflict1() {}
@pragma('dart2js:as:trust')
@pragma('dart2js:as:check')
/*error: [@pragma('dart2js:as:check') must not be used with @pragma('dart2js:as:trust').]*/
asConflict2() {}
@pragma('dart2js:parameter:trust')
@pragma('dart2js:parameter:check')
/*error: [@pragma('dart2js:parameter:check') must not be used with @pragma('dart2js:parameter:trust').]*/
parameterConflict1() {}
@pragma('dart2js:parameter:trust')
@pragma('dart2js:parameter:check')
/*error: [@pragma('dart2js:parameter:check') must not be used with @pragma('dart2js:parameter:trust').]*/
parameterConflict2() {}
@pragma('dart2js:downcast:trust')
@pragma('dart2js:downcast:check')
/*error: [@pragma('dart2js:downcast:check') must not be used with @pragma('dart2js:downcast:trust').]*/
downcastConflict1() {}
@pragma('dart2js:downcast:trust')
@pragma('dart2js:downcast:check')
/*error: [@pragma('dart2js:downcast:check') must not be used with @pragma('dart2js:downcast:trust').]*/
downcastConflict2() {}
@pragma('dart2js:types:trust')
@pragma('dart2js:types:check')
/*error: [@pragma('dart2js:types:check') must not be used with @pragma('dart2js:types:trust').]*/
typesConflict1() {}
@pragma('dart2js:types:trust')
@pragma('dart2js:types:check')
/*error: [@pragma('dart2js:types:check') must not be used with @pragma('dart2js:types:trust').]*/
typesConflict2() {}