Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] q.a = class {} resolves to undefined #33

Closed
SeregPie opened this issue Nov 5, 2017 · 1 comment
Closed

[bug] q.a = class {} resolves to undefined #33

SeregPie opened this issue Nov 5, 2017 · 1 comment

Comments

@SeregPie
Copy link

SeregPie commented Nov 5, 2017

Here is an example.


input

const q = {};

q.a = class {
  c () {}
}

output

var q = {};

q.a = (function () {
  function undefined () {}

  undefined.prototype.c = function c () {};

  return undefined;
}())

This way it is working fine.

const q = {};

Object.assign(q, {a: class {
	c () {}
}})
@SeregPie SeregPie changed the title [bug] q.b = class extends q.a resolves to undefined [bug] q.b = class {} resolves to undefined Nov 6, 2017
@SeregPie SeregPie changed the title [bug] q.b = class {} resolves to undefined [bug] q.a = class {} resolves to undefined Nov 6, 2017
@Rich-Harris
Copy link
Collaborator

fixed in 0.18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants