There was a matter about Cast and the old-parser... I don't remember it exactly but for sure there is a specific test so, if your fix now is passing all test well... it is fine and does not need revision ;)
2009/11/5 Steve Strong <[email protected]> > > Hi All, > > I've just made a change to this type. It used to have a member field that > stored the return type of the Cast, but since the instance is shared this > was causing problems. For example, in the following HQL: > > select cast(count(o), int) from Order o where o.OrderDate <= cast(:p1, > datetime) > > the processing second cast operator incorrectly causes the type of the > select to change from an int to a datetime. I don't believe this to be the > fault of the parser, rather a fault in the original implementation of > CastFunction. > > I'm pretty sure the changes I've made are fine, and all the tests are > passing, but I'd appreciate someone taking a look in case I've missed the > point of what the original code was doing. The only change is within > CastFunction.cs, and you can see a call to the ReturnType() method (the one > that was at fault) from Hql/Ast/Antlr/Tree/MethodNode.DialectFunction(). My > changes are in revision 4819. > > Cheers, > > Steve > -- Fabio Maulo
