Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2012-12

Is this future save? class casting for var-param

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Martin
having a
   procedure Foo(var x: TSomeClass);

calling it with

   Foo(TSomeClass(ObjOfBaseClassOfTSomeClass));

It compiles with 2.6.0.

Just want to be sure, it wont stop in future versions.

Reply by email

Unknown author
to Martin
Martin wrote 10 lines
having a procedure Foo(var x: TSomeClass); calling it with Foo(TSomeClass(ObjOfBaseClassOfTSomeClass)); It compiles with 2.6.0. Just want to be sure, it wont stop in future versions.

It should not stop.

Michael.

Reply by email