Skip to content

Commit

Permalink
Fix wrt analyzer tip
Browse files Browse the repository at this point in the history
  • Loading branch information
vsmenon committed Aug 2, 2016
1 parent 803b0e3 commit 0fd3e88
Show file tree
Hide file tree
Showing 13 changed files with 409 additions and 61 deletions.
64 changes: 36 additions & 28 deletions pkg/dev_compiler/lib/runtime/dart_sdk.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/dev_compiler/lib/src/compiler/reify_coercions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ class _TreeCloner extends analyzer.AstCloner {
}

@override
List/*<E>*/ cloneNodeList/*<E extends AstNode>*/(NodeList/*<E>*/ list) {
List/*<E>*/ cloneNodeList/*<E extends AstNode>*/(List/*<E>*/ list) {
var clone = super.cloneNodeList(list);
for (int i = 0, len = list.length; i < len; i++) {
_cloneProperties(clone[i], list[i]);
Expand Down
14 changes: 10 additions & 4 deletions pkg/dev_compiler/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ packages:
name: analyzer
url: "https://pub.dartlang.org"
source: hosted
version: "0.27.4-alpha.19"
version: "0.27.4"
args:
description:
name: args
Expand Down Expand Up @@ -162,7 +162,7 @@ packages:
name: package_config
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.5"
version: "1.0.0"
package_resolver:
description:
name: package_resolver
Expand Down Expand Up @@ -205,6 +205,12 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.5+2"
shelf_packages_handler:
description:
name: shelf_packages_handler
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
shelf_static:
description:
name: shelf_static
Expand Down Expand Up @@ -258,7 +264,7 @@ packages:
name: test
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.15+1"
version: "0.12.15+2"
typed_data:
description:
name: typed_data
Expand Down Expand Up @@ -313,4 +319,4 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.10"
sdk: ">=1.17.0-dev.6.2 <1.20.0"
sdk: ">=1.17.0-dev.6.2 <2.0.0"
6 changes: 0 additions & 6 deletions pkg/dev_compiler/test/browser/language_tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -774,15 +774,11 @@
'const_types_test_04_multi': notyetstrong,
'const_types_test_05_multi': notyetstrong,
'const_types_test_06_multi': notyetstrong,
'const_types_test_07_multi': notyetstrong,
'const_types_test_08_multi': notyetstrong,
'const_types_test_09_multi': notyetstrong,
'const_types_test_10_multi': notyetstrong,
'const_types_test_11_multi': notyetstrong,
'const_types_test_12_multi': notyetstrong,
'const_types_test_13_multi': notyetstrong,
'const_types_test_14_multi': notyetstrong,
'const_types_test_15_multi': notyetstrong,
'const_types_test_16_multi': notyetstrong,
'const_types_test_17_multi': notyetstrong,
'const_types_test_18_multi': notyetstrong,
Expand Down Expand Up @@ -815,7 +811,6 @@
'constant_locals_test_03_multi': notyetstrong,
'constant_locals_test_04_multi': notyetstrong,
'constant_locals_test_05_multi': notyetstrong,
'constant_type_literal_test_01_multi': notyetstrong,
'constructor10_test_00_multi': notyetstrong,
'constructor10_test_01_multi': notyetstrong,
'constructor10_test_02_multi': notyetstrong,
Expand Down Expand Up @@ -1259,7 +1254,6 @@
'interface_cycle_test_02_multi': notyetstrong,
'interface_test_00_multi': notyetstrong,
'interface_test_none_multi': notyetstrong,
'internal_library_test_02_multi': notyetstrong,
'invocation_mirror2_test': notyetstrong,
'invocation_mirror_invoke_on2_test': notyetstrong,
'invocation_mirror_invoke_on_test': notyetstrong,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ library internal_library_test;
import 'dart:core'; // This loads 'dart:_foreign_helper' and 'patch:core'.
import 'dart:_foreign_helper'; /// 01: compile-time error
part 'dart:_foreign_helper'; /// 02: compile-time error
// TODO(vsm): Restore once #618 is fixed.
// part 'dart:_foreign_helper'; /// 02: static type warning

void main() {
JS('int', '0'); /// 01: continued
JS('int', '0'); /// 02: continued
// JS('int', '0'); /// 02: continued
}
Original file line number Diff line number Diff line change
@@ -1 +1,74 @@
//FAILED TO COMPILE
dart_library.library('language/const_types_test_07_multi', null, /* Imports */[
'dart_sdk'
], function load__const_types_test_07_multi(exports, dart_sdk) {
'use strict';
const core = dart_sdk.core;
const dart = dart_sdk.dart;
const dartx = dart_sdk.dartx;
const const_types_test_07_multi = Object.create(null);
let ClassOfint = () => (ClassOfint = dart.constFn(const_types_test_07_multi.Class$(core.int)))();
let Class = () => (Class = dart.constFn(const_types_test_07_multi.Class$()))();
let Superclass = () => (Superclass = dart.constFn(const_types_test_07_multi.Superclass$()))();
let dynamicTodynamic = () => (dynamicTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [dart.dynamic])))();
let VoidTovoid = () => (VoidTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [])))();
const_types_test_07_multi.use = function(x) {
};
dart.fn(const_types_test_07_multi.use, dynamicTodynamic());
let const$;
let const$0;
let const$1;
let const$2;
let const$3;
let const$4;
let const$5;
let const$6;
let const$7;
let const$8;
const_types_test_07_multi.Class$ = dart.generic(T => {
let ClassOfT = () => (ClassOfT = dart.constFn(const_types_test_07_multi.Class$(T)))();
class Class extends core.Object {
new() {
}
named() {
}
test() {
const_types_test_07_multi.use(const$ || (const$ = dart.constList([], dart.dynamic)));
const_types_test_07_multi.use(const$0 || (const$0 = dart.constList([], const_types_test_07_multi.Class)));
const_types_test_07_multi.use(const$1 || (const$1 = dart.constList([], ClassOfint())));
const_types_test_07_multi.use(const$2 || (const$2 = dart.const(dart.map())));
const_types_test_07_multi.use(const$3 || (const$3 = dart.const(dart.map({}, core.String, const_types_test_07_multi.Class))));
const_types_test_07_multi.use(const$4 || (const$4 = dart.const(dart.map({}, core.String, ClassOfint()))));
const_types_test_07_multi.use(const$5 || (const$5 = dart.const(new const_types_test_07_multi.Class())));
const_types_test_07_multi.use(const$6 || (const$6 = dart.const(new (ClassOfint())())));
const_types_test_07_multi.use(dart.const(new (ClassOfT())()));
const_types_test_07_multi.use(const$7 || (const$7 = dart.const(new const_types_test_07_multi.Class.named())));
const_types_test_07_multi.use(const$8 || (const$8 = dart.const(new (ClassOfint()).named())));
}
}
dart.addTypeTests(Class);
dart.defineNamedConstructor(Class, 'named');
Class[dart.implements] = () => [const_types_test_07_multi.Superclass];
dart.setSignature(Class, {
constructors: () => ({
new: dart.definiteFunctionType(const_types_test_07_multi.Class$(T), []),
named: dart.definiteFunctionType(const_types_test_07_multi.Class$(T), [])
}),
methods: () => ({test: dart.definiteFunctionType(dart.void, [])})
});
return Class;
});
const_types_test_07_multi.Class = Class();
const_types_test_07_multi.Superclass$ = dart.generic(T => {
class Superclass extends core.Object {}
dart.addTypeTests(Superclass);
return Superclass;
});
const_types_test_07_multi.Superclass = Superclass();
const_types_test_07_multi.main = function() {
new const_types_test_07_multi.Class().test();
new const_types_test_07_multi.Superclass();
};
dart.fn(const_types_test_07_multi.main, VoidTovoid());
// Exports:
exports.const_types_test_07_multi = const_types_test_07_multi;
});
Original file line number Diff line number Diff line change
@@ -1 +1,75 @@
//FAILED TO COMPILE
dart_library.library('language/const_types_test_08_multi', null, /* Imports */[
'dart_sdk'
], function load__const_types_test_08_multi(exports, dart_sdk) {
'use strict';
const core = dart_sdk.core;
const dart = dart_sdk.dart;
const dartx = dart_sdk.dartx;
const const_types_test_08_multi = Object.create(null);
let ClassOfint = () => (ClassOfint = dart.constFn(const_types_test_08_multi.Class$(core.int)))();
let Class = () => (Class = dart.constFn(const_types_test_08_multi.Class$()))();
let Superclass = () => (Superclass = dart.constFn(const_types_test_08_multi.Superclass$()))();
let dynamicTodynamic = () => (dynamicTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [dart.dynamic])))();
let VoidTovoid = () => (VoidTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [])))();
const_types_test_08_multi.use = function(x) {
};
dart.fn(const_types_test_08_multi.use, dynamicTodynamic());
let const$;
let const$0;
let const$1;
let const$2;
let const$3;
let const$4;
let const$5;
let const$6;
let const$7;
let const$8;
const_types_test_08_multi.Class$ = dart.generic(T => {
let ClassOfT = () => (ClassOfT = dart.constFn(const_types_test_08_multi.Class$(T)))();
let ClassOfClassOfT = () => (ClassOfClassOfT = dart.constFn(const_types_test_08_multi.Class$(ClassOfT())))();
class Class extends core.Object {
new() {
}
named() {
}
test() {
const_types_test_08_multi.use(const$ || (const$ = dart.constList([], dart.dynamic)));
const_types_test_08_multi.use(const$0 || (const$0 = dart.constList([], const_types_test_08_multi.Class)));
const_types_test_08_multi.use(const$1 || (const$1 = dart.constList([], ClassOfint())));
const_types_test_08_multi.use(const$2 || (const$2 = dart.const(dart.map())));
const_types_test_08_multi.use(const$3 || (const$3 = dart.const(dart.map({}, core.String, const_types_test_08_multi.Class))));
const_types_test_08_multi.use(const$4 || (const$4 = dart.const(dart.map({}, core.String, ClassOfint()))));
const_types_test_08_multi.use(const$5 || (const$5 = dart.const(new const_types_test_08_multi.Class())));
const_types_test_08_multi.use(const$6 || (const$6 = dart.const(new (ClassOfint())())));
const_types_test_08_multi.use(dart.const(new (ClassOfClassOfT())()));
const_types_test_08_multi.use(const$7 || (const$7 = dart.const(new const_types_test_08_multi.Class.named())));
const_types_test_08_multi.use(const$8 || (const$8 = dart.const(new (ClassOfint()).named())));
}
}
dart.addTypeTests(Class);
dart.defineNamedConstructor(Class, 'named');
Class[dart.implements] = () => [const_types_test_08_multi.Superclass];
dart.setSignature(Class, {
constructors: () => ({
new: dart.definiteFunctionType(const_types_test_08_multi.Class$(T), []),
named: dart.definiteFunctionType(const_types_test_08_multi.Class$(T), [])
}),
methods: () => ({test: dart.definiteFunctionType(dart.void, [])})
});
return Class;
});
const_types_test_08_multi.Class = Class();
const_types_test_08_multi.Superclass$ = dart.generic(T => {
class Superclass extends core.Object {}
dart.addTypeTests(Superclass);
return Superclass;
});
const_types_test_08_multi.Superclass = Superclass();
const_types_test_08_multi.main = function() {
new const_types_test_08_multi.Class().test();
new const_types_test_08_multi.Superclass();
};
dart.fn(const_types_test_08_multi.main, VoidTovoid());
// Exports:
exports.const_types_test_08_multi = const_types_test_08_multi;
});
Original file line number Diff line number Diff line change
@@ -1 +1,74 @@
//FAILED TO COMPILE
dart_library.library('language/const_types_test_14_multi', null, /* Imports */[
'dart_sdk'
], function load__const_types_test_14_multi(exports, dart_sdk) {
'use strict';
const core = dart_sdk.core;
const dart = dart_sdk.dart;
const dartx = dart_sdk.dartx;
const const_types_test_14_multi = Object.create(null);
let ClassOfint = () => (ClassOfint = dart.constFn(const_types_test_14_multi.Class$(core.int)))();
let Class = () => (Class = dart.constFn(const_types_test_14_multi.Class$()))();
let Superclass = () => (Superclass = dart.constFn(const_types_test_14_multi.Superclass$()))();
let dynamicTodynamic = () => (dynamicTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [dart.dynamic])))();
let VoidTovoid = () => (VoidTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [])))();
const_types_test_14_multi.use = function(x) {
};
dart.fn(const_types_test_14_multi.use, dynamicTodynamic());
let const$;
let const$0;
let const$1;
let const$2;
let const$3;
let const$4;
let const$5;
let const$6;
let const$7;
let const$8;
const_types_test_14_multi.Class$ = dart.generic(T => {
let ClassOfT = () => (ClassOfT = dart.constFn(const_types_test_14_multi.Class$(T)))();
class Class extends core.Object {
new() {
}
named() {
}
test() {
const_types_test_14_multi.use(const$ || (const$ = dart.constList([], dart.dynamic)));
const_types_test_14_multi.use(const$0 || (const$0 = dart.constList([], const_types_test_14_multi.Class)));
const_types_test_14_multi.use(const$1 || (const$1 = dart.constList([], ClassOfint())));
const_types_test_14_multi.use(const$2 || (const$2 = dart.const(dart.map())));
const_types_test_14_multi.use(const$3 || (const$3 = dart.const(dart.map({}, core.String, const_types_test_14_multi.Class))));
const_types_test_14_multi.use(const$4 || (const$4 = dart.const(dart.map({}, core.String, ClassOfint()))));
const_types_test_14_multi.use(const$5 || (const$5 = dart.const(new const_types_test_14_multi.Class())));
const_types_test_14_multi.use(const$6 || (const$6 = dart.const(new (ClassOfint())())));
const_types_test_14_multi.use(const$7 || (const$7 = dart.const(new const_types_test_14_multi.Class.named())));
const_types_test_14_multi.use(const$8 || (const$8 = dart.const(new (ClassOfint()).named())));
const_types_test_14_multi.use(dart.const(new (ClassOfT()).named()));
}
}
dart.addTypeTests(Class);
dart.defineNamedConstructor(Class, 'named');
Class[dart.implements] = () => [const_types_test_14_multi.Superclass];
dart.setSignature(Class, {
constructors: () => ({
new: dart.definiteFunctionType(const_types_test_14_multi.Class$(T), []),
named: dart.definiteFunctionType(const_types_test_14_multi.Class$(T), [])
}),
methods: () => ({test: dart.definiteFunctionType(dart.void, [])})
});
return Class;
});
const_types_test_14_multi.Class = Class();
const_types_test_14_multi.Superclass$ = dart.generic(T => {
class Superclass extends core.Object {}
dart.addTypeTests(Superclass);
return Superclass;
});
const_types_test_14_multi.Superclass = Superclass();
const_types_test_14_multi.main = function() {
new const_types_test_14_multi.Class().test();
new const_types_test_14_multi.Superclass();
};
dart.fn(const_types_test_14_multi.main, VoidTovoid());
// Exports:
exports.const_types_test_14_multi = const_types_test_14_multi;
});
Loading

0 comments on commit 0fd3e88

Please sign in to comment.