question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[MemberExpression] Long object access doesn't wrap

See original GitHub issue

Not sure if this is a bug or just a rare enough case that it doesn’t matter

Input

something()
  .something
  .something()
  .something
  .something()
  .something
  .something()

Output

something().something.something().something.something().something.something();

(Longer than 60 chars)

Input

someVeryLongMethodObjectName
  .withSomeVeryLongObjectKey
  .andAnotherLongKey;

Output

someVeryLongMethodObjectName.withSomeVeryLongObjectKey.andAnotherLongKey;

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
vjeuxcommented, Jan 25, 2017

@despairblue thank you! This is great! Shouldn’t be too hard to make work.

0reactions
vjeuxcommented, Jan 25, 2017

With #462 it looks like

if (testConfig.ENABLE_ONLINE_TESTS === "true") {
  describe("POST /users/me/pet", function() {
    it("saves pet", function() {
      function assert(pet) {
        expect(pet).to.have.property("OwnerAddress").that.deep.equals({
          AddressLine1: "Alexanderstrasse",
          AddressLine2: "",
          PostalCode: "10999",
          Region: "Berlin",
          City: "Berlin",
          Country: "DE"
        });
      }
    });
  });
}

which is better. But we should also be able to break the .to.have.property()

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - Access the value of a member expression - Stack Overflow
Update I have tried this but it doesn't seem to work. var memberExpression = (MemberExpression)GetRootConstantExpression(m); var fi = (PropertyInfo) ...
Read more >
Optional Chaining Bugs Checklist #7256 - babel/babel - GitHub
If a plugin transforms MemberExpression nodes and doesn't know to expect optional as a ... true - This node is explicitly an optional...
Read more >
Working with Expression Trees in C# • Oleksii Holub
In order to do that, we have to create an entry point by wrapping everything in a lambda expression. To turn it into...
Read more >
Determining the object that caused a null reference exception?
To prevent an X/Y problem, the goal is to simply record what object causes a null reference exception to be thrown, since the...
Read more >
MemberExpression Class (System.Linq.Expressions)
Gets the containing object of the field or property. Member. Gets the field or property to be accessed. NodeType. Returns the node type...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found