mirror of
https://github.com/dart-lang/sdk
synced 2024-09-15 22:59:47 +00:00
[dart2js] Rewrite lib/html/js_typed_interop_type_test to use external
fields. This brings it more in line with the lib_2 version. Change-Id: I99e4f6a467fa5b58d6e7c5206e1f6d9956fc60bc Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158961 Auto-Submit: Mayank Patke <fishythefish@google.com> Commit-Queue: Sigmund Cherem <sigmund@google.com> Reviewed-by: Sigmund Cherem <sigmund@google.com>
This commit is contained in:
parent
a51f1747e0
commit
41953c8835
|
@ -203,8 +203,7 @@ class MessageTemplate {
|
|||
MessageKind.JS_INTEROP_CLASS_NON_EXTERNAL_MEMBER: const MessageTemplate(
|
||||
MessageKind.JS_INTEROP_CLASS_NON_EXTERNAL_MEMBER,
|
||||
"Member '#{member}' in js-interop class '#{cls}' is not external.",
|
||||
howToFix: "Try adding 'external' to '#{member}'. If #{member} is a "
|
||||
"`late` field, use an `external` getter/setter instead.",
|
||||
howToFix: "Try adding 'external' to '#{member}'.",
|
||||
examples: const [
|
||||
"""
|
||||
import 'package:js/js.dart';
|
||||
|
|
|
@ -26,7 +26,7 @@ class B {
|
|||
@JS()
|
||||
@anonymous
|
||||
class C {
|
||||
external get foo;
|
||||
external final foo;
|
||||
|
||||
external factory C({foo});
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ class C {
|
|||
@JS()
|
||||
@anonymous
|
||||
class D {
|
||||
external get foo;
|
||||
external final foo;
|
||||
|
||||
external factory D({foo});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue