Re: Indy churning through LambdaForm classes

Paul King <[email protected]>
Newsgroups gmane.comp.lang.groovy.user
Message-ID <CAMbkE7TLj1dBputbDKnXzo8PTdrJfDmn5SBJsXWL7jPLnaarrg@mail.gmail.com>
Yes, please create a ticket.

On Mon, Aug 7, 2023 at 11:16 PM Gillespie, Oli <[email protected]>
wrote:

> Hi Jochen,
>
> Thanks for looking, and for the findings - interesting!
>
> Actually I think my reproducer was not a good representation of the real
> issue I saw in production.
> I added the getName() call in my first repro as a random thing to do with
> the argument, but that introduced unintended behaviour.
>
> My real case is closer to this (literally implementations of List, in my
> case):
>
> ```
> def foo(List<String> x) {  }
> def bar(List<String> x) { foo(x) }
> List<String> l1 = new ArrayList();
> List<String> l2 = new LinkedList();
> while (true) {
>     bar(l1)
>     127.times { bar(l2) }
> }
> ```
>
> The call site causing the difficulty here is (I think) foo(x) within bar,
> where a 'sameClasses' guard is inserted and
> invalidates the previous method handle whenever the argument class changes
> (LinkedList != ArrayList) -
> I confirmed this by adding logging to the guard.
>
> Oli
>
> P.S. I now have a JIRA account for Groovy, should I create a ticket?
>
>
>
> Amazon Development Centre (London) Ltd. Registered in England and Wales
> with registration number 04543232 with its registered office at 1 Principal
> Place, Worship Street, London EC2A 2FA, United Kingdom.
>
>
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.