Allow base destructors to run and fix some error reporting.
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
native Handle:CreateHandle();
|
||||
|
||||
methodmap Handle {
|
||||
public Handle() = CreateHandle;
|
||||
};
|
||||
|
||||
public main() {
|
||||
new Handle:handle = Handle();
|
||||
delete handle;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
methodmap Handle has no destructor; delete cannot be used
|
||||
@@ -0,0 +1,15 @@
|
||||
native Handle:CreateHandle(count);
|
||||
native CloseHandle(Handle:handle);
|
||||
|
||||
methodmap Handle {
|
||||
public Handle() = CreateHandle;
|
||||
public ~Handle() = CloseHandle;
|
||||
};
|
||||
|
||||
methodmap Crab < Handle {
|
||||
};
|
||||
|
||||
public main() {
|
||||
new Crab:crab;
|
||||
delete crab;
|
||||
}
|
||||
@@ -42,7 +42,7 @@ def run_tests(args):
|
||||
|
||||
if status == 'ok' and kind != 'pass':
|
||||
with open(os.path.join(testdir, test + '.txt')) as fp:
|
||||
text = fp.read()
|
||||
text = fp.read().strip()
|
||||
if text not in stdout:
|
||||
print('Expected to find text in stdout: >>>')
|
||||
print(text)
|
||||
|
||||
Reference in New Issue
Block a user