On 04/08/2011 14:52, Alexander Klenin wrote:
[...]

My thoughts exactly! :)

How about some explicit syntax sugar to help Code Tools understand 
this construct? 

 e.g. that an alias can only be declared within the with statement:
(and of course the whole alias business can be optional)

with MyLongAndComplicatedObject [as a[:optional type declaration]]
     [,optionally repeated for more aliases] do
begin // 'a' can only be used as alias if not defined in header, error if it 
does

  // without type declaration you get
  a.Foo; // MyLongAndComplicatedObject.Foo;

  // with type declaration, you get a cast:
  a.Bar; // TFoo(MyLongAndComplicatedObject).Foo;

end;  // scope of 'a' ends here

Hm?

L.


--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to