mirror of
https://github.com/dart-lang/sdk
synced 2024-09-30 09:33:32 +00:00
f20b0ddcc2
Closes https://github.com/dart-lang/sdk/issues/43022 Real static errors were added in a previous CL. This simply removes TODOs to address that and removes a TODO to handle contexts. Static error testing doesn't support testing for contexts. Change-Id: Id27fadeb77484a3556fdfdf4c50c8cd67ce2d9a0 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159381 Auto-Submit: Srujan Gaddam <srujzs@google.com> Commit-Queue: Srujan Gaddam <srujzs@google.com> Commit-Queue: Nate Bosch <nbosch@google.com> Reviewed-by: Nate Bosch <nbosch@google.com>
43 lines
1.2 KiB
Dart
43 lines
1.2 KiB
Dart
// Copyright (c) 2020, 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.
|
|
|
|
// Tests static errors for incorrect JS annotations.
|
|
|
|
@JS()
|
|
library js_annotation_static_test;
|
|
|
|
import 'package:js/js.dart';
|
|
|
|
class Foo {
|
|
@JS()
|
|
external Foo(int bar);
|
|
// ^
|
|
// [web] Member has a JS interop annotation but the enclosing class does not.
|
|
@JS()
|
|
external factory Foo.fooFactory();
|
|
// ^
|
|
// [web] Member has a JS interop annotation but the enclosing class does not.
|
|
@JS()
|
|
external int get bar;
|
|
// ^^^
|
|
// [web] Member has a JS interop annotation but the enclosing class does not.
|
|
@JS()
|
|
external set bar(int val);
|
|
// ^^^
|
|
// [web] Member has a JS interop annotation but the enclosing class does not.
|
|
@JS()
|
|
external int baz();
|
|
// ^^^
|
|
// [web] Member has a JS interop annotation but the enclosing class does not.
|
|
@JS()
|
|
external static int bazStatic();
|
|
// ^^^^^^^^^
|
|
// [web] Member has a JS interop annotation but the enclosing class does not.
|
|
}
|
|
|
|
@JS()
|
|
external int qux();
|
|
|
|
main() {}
|