fix tests, better block scoped collisions

This commit is contained in:
Sebastian McKenzie
2015-04-04 14:17:26 +11:00
parent 7c710a0378
commit 4bd19da3c2
6 changed files with 20 additions and 16 deletions

View File

@@ -89,7 +89,7 @@ var a: Promise<bool>[]
var a:(...rest:Array<number>) => number
var identity: <T>(x: T) => T
var identity: <T>(x: T, ...y:T[]) => T
import type foo from "bar";
import type foo4 from "bar";
import type { foo2, bar } from "baz";
import type { foo as bar2 } from "baz";
import type from "foo";

View File

@@ -1,4 +1,4 @@
class Foo {
class Foo extends Bar {
constructor (options) {
let parentOptions = {};
parentOptions.init = function () {

View File

@@ -1,11 +1,16 @@
"use strict";
var Foo = function Foo(options) {
babelHelpers.classCallCheck(this, Foo);
var Foo = (function (_Bar) {
function Foo(options) {
babelHelpers.classCallCheck(this, Foo);
var parentOptions = {};
parentOptions.init = function () {
this;
};
babelHelpers.get(Object.getPrototypeOf(Foo.prototype), "constructor", this).call(this, parentOptions);
};
var parentOptions = {};
parentOptions.init = function () {
this;
};
babelHelpers.get(Object.getPrototypeOf(Foo.prototype), "constructor", this).call(this, parentOptions);
}
babelHelpers.inherits(Foo, _Bar);
return Foo;
})(Bar);

View File

@@ -1,9 +1,7 @@
"use strict";
var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { "default": obj }; };
var _toString = require("foo");
var _toString2 = _interopRequireWildcard(_toString);
var _toString2 = babelHelpers.interopRequireWildcard(_toString);
_toString2["default"];
_toString2["default"];