Jump to content
Registration disabled at the moment Read more... ×
Rustam Novikov

inline var and type deduction with Currency type

Recommended Posts

I have a following simple code:

          var x: Currency;
          var y := x;

Can anyone explain why variable y type is Extended and not Currency?

My expectation is that type deduction should deduce Currency type from x variable type. 

This erroneous type deduction leads to problems when later I want to compare variable y to some other variable, say z: Currency:

if (x<>z) then raise...

Is it "by design" or some compiler issue?  

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×