@@ -0,0 +1,31 @@
+type
+ tobj = object
+ l: longint;
+ constructor init;
+ procedure setV(v: longint);
+ destructor done;
+ end;
+
+constructor tobj.init;
+begin
+ l := 0;
+end;
+procedure tobj.setV(v: longint);
+ l := v;
+destructor tobj.done;
+var t: tobj;
+ t.init;
+ with t do
+ setV(5);
+ writeln(t.l, ' (should be 5!)');
+ t.done;
+end.
@@ -396,3 +396,4 @@ bug0262.pp problems with virtual and overloaded methods
bug0293.pp no error with variable name = type name
bug0299.pp passing Array[0..1] of char by value to proc leads to problems
bug0305.pp Finally is not handled correctly after inputting 0
+bug0307.pp "with object_type" doesn't work correctly!