Skip to content

Commit 6859e76

Browse files
committed
DDC fixes on DDC
This isn't everything by far, but most issues local to DDC itself that we mark error right now. There are a bunch of down casts around literals and not-quite-generic methods. [email protected] Review URL: https://codereview.chromium.org/963063003
1 parent 2a5adfe commit 6859e76

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

pkg/dev_compiler/lib/config.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ library ddc.config;
88
// Options shared by the compiler and runtime.
99
class TypeOptions {
1010
static const NONNULLABLE_TYPES = const <String>['int', 'double'];
11-
final nonnullableTypes;
11+
final List<String> nonnullableTypes;
1212

1313
TypeOptions({this.nonnullableTypes: NONNULLABLE_TYPES});
1414
}

pkg/dev_compiler/lib/src/codegen/js_codegen.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ConversionVisitor {
315315
// If we don't have a method body, skip this.
316316
if (fields.isEmpty) return null;
317317

318-
var body = _initializeFields(fields);
318+
dynamic body = _initializeFields(fields);
319319
var superCall = _superConstructorCall(node);
320320
if (superCall != null) body = [[body, superCall]];
321321
return new JS.Method(

pkg/dev_compiler/lib/src/js/printer.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1285,7 +1285,7 @@ class DanglingElseVisitor extends BaseVisitor<bool> {
12851285

12861286
bool visitProgram(Program node) => false;
12871287

1288-
bool visitNode(Statement node) {
1288+
bool visitNode(Node node) {
12891289
context.error("Forgot node: $node");
12901290
return null;
12911291
}

pkg/dev_compiler/lib/src/js/template.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ class Template {
125125
* trees. [arguments] is a List for positional templates, or Map for
126126
* named templates.
127127
*/
128-
typedef Node Instantiator(var arguments);
128+
typedef Instantiator(var arguments);
129129

130130

131131
/**

pkg/dev_compiler/lib/src/options.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class ResolverOptions {
5454
final bool onlyInferConstsAndFinalFields;
5555

5656
ResolverOptions({this.useMultiPackage: false, this.packageRoot: 'packages/',
57-
this.packagePaths: const [], this.inferFromOverrides: true,
57+
this.packagePaths: const <String>[], this.inferFromOverrides: true,
5858
this.inferStaticsFromIdentifiers: false,
5959
this.inferInNonStableOrder: false,
6060
this.onlyInferConstsAndFinalFields: false});
@@ -187,7 +187,7 @@ class CompilerOptions implements RulesOptions, ResolverOptions {
187187
this.outputDart: false, this.useColors: true,
188188
this.covariantGenerics: true, this.relaxedCasts: true,
189189
this.useMultiPackage: false, this.packageRoot: 'packages/',
190-
this.packagePaths: const [], this.inferFromOverrides: true,
190+
this.packagePaths: const <String>[], this.inferFromOverrides: true,
191191
this.inferStaticsFromIdentifiers: false,
192192
this.inferInNonStableOrder: false,
193193
this.onlyInferConstsAndFinalFields: false,

0 commit comments

Comments
 (0)