This commit is contained in:
commit
568474d52f
1591 files changed
+528213
No files matched your search
@@ -0,0 +1,14 @@
|
||||
# probe: is a struct's List field safe to assign in a loop when nothing reads the struct afterwards? (no: the built program crashes on a later pass; with the last line uncommented it runs)
|
||||
@fieldwise_init
|
||||
struct Origin(Copyable, Movable):
|
||||
var hash: List[Int]
|
||||
|
||||
|
||||
def main():
|
||||
var r = Origin(List[Int]())
|
||||
for e in range(3):
|
||||
print("pass", e)
|
||||
var f = List[Int]()
|
||||
f.append(2)
|
||||
r.hash = f.copy()
|
||||
# print(len(r.hash))
|
||||
Reference in new issue
Block a user