Collection object resolution doesn't work when not assigned to variable.

Issue #1500 resolved
Justin Julicher created an issue

When you create a list, set or map inline resolution of methods doesn’t work.

Comments (8)

  1. Scott Wells repo owner

    Justin, I'm unable to reproduce this. I just tried the following:

    new List<String> { 'Scott', 'Wells' }.contains('Justin')
    

    and there were no errors. I do see an extract closing parenthesis in your example. Is that perhaps the issue? Or am I misunderstanding the problem you're reporting?

  2. Scott Wells repo owner

    Resolving due to lack of activity. If this is still happening, feel free to reopen with a reproducible example (since I wasn't able to reproduce based on the original one).

  3. Justin Julicher

    Hi Scott,

    Sorry I only just saw this again…. mustn’t have gotten the email last time or something.

    I think I didn’t explain this clearly in the original post. If I type in 'new List<String> { 'Scott', 'Wells' }' in apex debugger then hit ctrl-enter I would expect it to list all the methods for the List Class - but I get no suggestions (as per the screenshot below).

    I just tried this again and (being on a new laptop and new project) don’t get the suggestions.

    Expected:

    Does that work for you?

    thanks

  4. Scott Wells repo owner
    • changed status to open

    Yep, that reproduced it. I wonder why it didn't reproduce previously. I must have been doing something different than your original example. Anyway, reopening so I can address it.

  5. Log in to comment