mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 10:48:25 +00:00
[dart2js] Fix some compilation errors in dart2js/native.
Change-Id: Idb614189a31ceaeb53a9acb1f23f0ff3f46eb9c4 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150666 Reviewed-by: Stephen Adams <sra@google.com> Commit-Queue: Joshua Litt <joshualitt@google.com>
This commit is contained in:
parent
0d3e77d28e
commit
3798e5c2f0
|
@ -9,7 +9,7 @@ import 'native_testing.dart';
|
|||
|
||||
@Native("Node")
|
||||
class Node {
|
||||
final parentNode;
|
||||
get parentNode native;
|
||||
}
|
||||
|
||||
makeNode(parent) native;
|
||||
|
|
|
@ -10,7 +10,7 @@ import "native_testing.dart";
|
|||
|
||||
@Native("Node")
|
||||
class Node {
|
||||
final Node parentNode;
|
||||
Node get parentNode native;
|
||||
|
||||
ModelSource _modelSource; // If null, inherited from parent.
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ import 'native_testing.dart';
|
|||
class E {
|
||||
E._used() native; // Bogus native constructor, called only from fake body.
|
||||
|
||||
final int code;
|
||||
int get code native;
|
||||
}
|
||||
|
||||
// Type with exception-throwing methods.
|
||||
|
|
|
@ -9,7 +9,7 @@ import "native_testing.dart";
|
|||
|
||||
@Native("A")
|
||||
class A {
|
||||
final String aa;
|
||||
String get aa native;
|
||||
foo() => "A-foo $aa";
|
||||
baz() => "A-baz $aa";
|
||||
}
|
||||
|
|
|
@ -5,14 +5,14 @@
|
|||
import "native_testing.dart";
|
||||
|
||||
abstract class Window {
|
||||
final int document;
|
||||
int get document native;
|
||||
}
|
||||
|
||||
// Defining this global object makes Frog eager on optimizing
|
||||
// call sites where the receiver is typed 'Window'.
|
||||
@Native("@*DOMWindow")
|
||||
class _DOMWindowJs implements Window {
|
||||
final int document;
|
||||
int get document native;
|
||||
}
|
||||
|
||||
class Win implements Window {
|
||||
|
|
|
@ -5,14 +5,14 @@
|
|||
import "native_testing.dart";
|
||||
|
||||
abstract class Window {
|
||||
final int document;
|
||||
int get document native;
|
||||
}
|
||||
|
||||
// Defining this global object makes Frog eager on optimizing
|
||||
// call sites where the receiver is typed 'Window'.
|
||||
@Native("@*DOMWindow")
|
||||
class _DOMWindowJs implements Window {
|
||||
final int document;
|
||||
int get document native;
|
||||
}
|
||||
|
||||
class Win implements Window {
|
||||
|
|
|
@ -17,8 +17,8 @@ var log;
|
|||
@Native("A")
|
||||
class A {
|
||||
final a1 = log(101); // Only initialized IF named constructor called.
|
||||
final a2; // Initialized by native constructor.
|
||||
final a3; // Initialized only by A.two.
|
||||
get a2 native; // Initialized by native constructor.
|
||||
var a3; // Initialized only by A.two.
|
||||
var a4 = log(104);
|
||||
|
||||
A.one();
|
||||
|
@ -37,7 +37,7 @@ class A {
|
|||
}
|
||||
|
||||
class B extends A {
|
||||
final b1;
|
||||
var b1;
|
||||
final b2 = log(202);
|
||||
var b3;
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ import 'native_testing.dart';
|
|||
|
||||
@Native("Node")
|
||||
class Node {
|
||||
final parentNode;
|
||||
get parentNode native;
|
||||
}
|
||||
|
||||
makeNode(parent) native;
|
||||
|
|
|
@ -12,7 +12,7 @@ import "native_testing.dart";
|
|||
|
||||
@Native("Node")
|
||||
class Node {
|
||||
final Node parentNode;
|
||||
Node get parentNode native;
|
||||
|
||||
ModelSource _modelSource; // If null, inherited from parent.
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ import 'native_testing.dart';
|
|||
class E {
|
||||
E._used() native; // Bogus native constructor, called only from fake body.
|
||||
|
||||
final int code;
|
||||
int get code native;
|
||||
}
|
||||
|
||||
// Type with exception-throwing methods.
|
||||
|
|
|
@ -11,7 +11,7 @@ import "native_testing.dart";
|
|||
|
||||
@Native("A")
|
||||
class A {
|
||||
final String aa;
|
||||
String get aa native;
|
||||
foo() => "A-foo $aa";
|
||||
baz() => "A-baz $aa";
|
||||
}
|
||||
|
|
|
@ -7,14 +7,14 @@
|
|||
import "native_testing.dart";
|
||||
|
||||
abstract class Window {
|
||||
final int document;
|
||||
int get document native;
|
||||
}
|
||||
|
||||
// Defining this global object makes Frog eager on optimizing
|
||||
// call sites where the receiver is typed 'Window'.
|
||||
@Native("@*DOMWindow")
|
||||
class _DOMWindowJs implements Window {
|
||||
final int document;
|
||||
int get document native;
|
||||
}
|
||||
|
||||
class Win implements Window {
|
||||
|
|
|
@ -7,14 +7,14 @@
|
|||
import "native_testing.dart";
|
||||
|
||||
abstract class Window {
|
||||
final int document;
|
||||
int get document native;
|
||||
}
|
||||
|
||||
// Defining this global object makes Frog eager on optimizing
|
||||
// call sites where the receiver is typed 'Window'.
|
||||
@Native("@*DOMWindow")
|
||||
class _DOMWindowJs implements Window {
|
||||
final int document;
|
||||
int get document native;
|
||||
}
|
||||
|
||||
class Win implements Window {
|
||||
|
|
|
@ -19,8 +19,8 @@ var log;
|
|||
@Native("A")
|
||||
class A {
|
||||
final a1 = log(101); // Only initialized IF named constructor called.
|
||||
final a2; // Initialized by native constructor.
|
||||
final a3; // Initialized only by A.two.
|
||||
get a2 native; // Initialized by native constructor.
|
||||
var a3; // Initialized only by A.two.
|
||||
var a4 = log(104);
|
||||
|
||||
A.one();
|
||||
|
@ -39,7 +39,7 @@ class A {
|
|||
}
|
||||
|
||||
class B extends A {
|
||||
final b1;
|
||||
var b1;
|
||||
final b2 = log(202);
|
||||
var b3;
|
||||
|
||||
|
|
Loading…
Reference in a new issue