This commit is contained in:
commit
568474d52f
1591 files changed
+528213
No files matched your search
@@ -0,0 +1,14 @@
|
||||
# probe: 1.0.0 notes said __del__ still works, deprecated; does it in 1.1.0?
|
||||
struct Old:
|
||||
var v: Int
|
||||
|
||||
def __init__(out self, v: Int):
|
||||
self.v = v
|
||||
|
||||
def __del__(deinit self):
|
||||
print("old-style destructor ran")
|
||||
|
||||
|
||||
def main():
|
||||
var o = Old(1)
|
||||
print(o.v)
|
||||
Reference in new issue
Block a user