Am 18.10.2015 16:07 schrieb "Mattias Gaertner" <[email protected]>: > > On Sat, 17 Oct 2015 09:28:53 +0200 > Sven Barth <[email protected]> wrote: > > > It still looks strange to me. > > > > Well... It's a logical extension of the type helpers however (and Delphi > > compatible). The only critical part is that literal constants don't have a > > type per se and thus the chosen helper might be different :/ (e.g. an Int16 > > helper when one expected an Int32 one or so...) > > Does the compiler support 3.member?
Yes. I especially adjusted the compiler to handle this correctly (in light of floating point constants). Sidenote: the compiler also supports floating point numbers with an without "e" to have type helper method calls. "True" and "False" as well by the way. Best take a look at the tests we have (tests/test/tthlp*.pp), especially tthlp4.pp which deals with constants. The follow up tests also deal with the different String types combined with mode switches. Oh and there are also class methods that can be called on both the values as well as the type names, just like on classes and records (don't know whether the CodeTools support these for helpers yet). Regards, Sven
-- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
