RAD Studio (Common)
W1050: WideChar reduced to byte char in set expressions (Delphi)

"Set of char" in Win32 defines a set over the entire range of the Char type. Since Char is a byte-sized type in Win32, this defines a set of maximum size containing 256 elements. In .NET, Char is a word-sized type, and this range (0..65535) exceeds the capacity of the set type. 

To accomodate existing code that uses this "Set of Char" syntax, the compiler will treat the expression as "set of AnsiChar". The warning message reminds you that the set can only store the boolean state of 256 distinct elements, not the full range of the Char type.

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!