TWebClientDataSet(WebIndexedDbClientDataset.GetClonedDataset) still fails in 2.9.1.0

@Pieter I thought that using Web Core 2.9.1.0 I could remove the workaround that you provided me in Apparent mismatch between IDE parser and compiler on several TWebClientDataset methods, but if I remove the TOpen class declaration and its invocation statement just before the cast statement, the resulting WCDS methods (e.g., WCDS.First) fail as before. So I still need the workaround.

Apparently the fix was not complete.

Hi,

The workaround was there to let you keep compiling the code, but you are cloning TWebIndexedDBClientDataSet to a TWebClientDataSet, which is not correct. When cloning it creates an instance with the same class, which is TWebIndexedDBClientDataSet.

Thanks, I misunderstood your previous reply and didn't realize that you gave me a hack rather than a temporary workaround. The cast statement has always compiled with no error messages. It's only the subsequent method calls that fail without the hack. If the cast is actually incorrect (as @Bruno also said), I suggest that it should provoke some sort of warning/error message from the IDE or the compiler. Surely I'm not the only feckless coder who would like to perform this cast. Why not make it work? :smirking_face:

How can you expect that a clone method suddenly returns a class of a different type?

I can expect it because it does work with @Pieter 's hack. :smile:

It makes it compile, but at runtime, the type is still the same as the type from where you take the clone.
Let's leave this discussiuon with this final answer.

OK, I'll concede to your much greater experience, Bruno. Whatever is its actual type, the receiving object seems to behave in all respects as a TWCDB.