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

jsii-diff: crashes when a method turns into a property #520

Closed
eladb opened this issue Jun 6, 2019 · 0 comments · Fixed by #521
Closed

jsii-diff: crashes when a method turns into a property #520

eladb opened this issue Jun 6, 2019 · 0 comments · Fixed by #521
Assignees

Comments

@eladb
Copy link
Contributor

eladb commented Jun 6, 2019

Repro:

Before:

class Foo {
  bar() { return 1; }
}

After:

class Foo {
  get bar() { return 1; }
}

Error:

TypeError: Cannot read property 'forEach' of undefined
    at compareMethod (/Users/benisrae/code/jsii/jsii/packages/jsii-diff/lib/classes-ifaces.ts:135:22)
    at Object.compareReferenceType (/Users/benisrae/code/jsii/jsii/packages/jsii-diff/lib/classes-ifaces.ts:32:7)
    at compareClasses (/Users/benisrae/code/jsii/jsii/packages/jsii-diff/lib/index.ts:31:5)
    at Object.compareAssemblies (/Users/benisrae/code/jsii/jsii/packages/jsii-diff/lib/index.ts:22:3)
    at compare (/Users/benisrae/code/jsii/jsii/packages/jsii-diff/test/util.ts:33:10)
@eladb eladb self-assigned this Jun 6, 2019
eladb pushed a commit that referenced this issue Jun 6, 2019
Famous last words: "Trust me I know what I'm doing"

Fixes #520
@eladb eladb closed this as completed in #521 Jun 6, 2019
eladb pushed a commit that referenced this issue Jun 6, 2019
Famous last words: "Trust me I know what I'm doing"

Fixes #520
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

Successfully merging a pull request may close this issue.

1 participant