Invalid C3 class
Closed this issue · 2 comments
eugeneloza commented
In https://github.com/eugeneloza/modern-pascal-introduction/blob/master/code-samples/interfaces_corba_test.lpr TMyClass3 doesn't refer to the interface and therefore will cause an error, right? This "feature" is described in two sequential examples, but in the first example it looks unexpected.
michaliskambi commented
The condition C3 is IMyInterface will be false, in the if C3 is IMyInterface then ... . So it will not cause an error, the line UseThroughInterface(C3 as IMyInterface) simply will not be executed.
I'll mark it in the code, to make it clear. Thank you!
michaliskambi commented
I updated the example code:)