Revision d215d914ee388efb0737135d81dcc581e0016f8e authored by Keno Fischer on 15 July 2023, 17:01:26 UTC, committed by GitHub on 15 July 2023, 17:01:26 UTC
Fixes the case from #50518, but we actually have two test cases in the
tests that also hit this (e.g. this one:
```
f40964(xs::Int...=1; k = 2) = (xs, k)
```
), but just happened not to hit the bad codegen path. #50556, once
merged would have complained on those definitions as well, without this
fix.
2 parent s 191256e + c272236
Raw File
linkedlist.jl
# This file is a part of Julia. License is MIT: https://julialang.org/license

mutable struct ListNode
  key::Int64
  next::ListNode
  ListNode() = new()
  ListNode(x)= new(x)
  ListNode(x,y) = new(x,y);
end

function list(N=16*1024^2)
    start::ListNode = ListNode(1)
    current::ListNode = start
    for i = 2:N
        current = ListNode(i,current)
    end
    return current.key
end

# Memory use is 512 MB
_ = list()

GC.gc()
back to top