Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Source/uPSCompiler.pas
Original file line number Diff line number Diff line change
Expand Up @@ -3287,7 +3287,10 @@ function TPSPascalCompiler.IsCompatibleType(p1, p2: TPSType; Cast: Boolean): Boo
((p1.BaseType = btUnicodeString) and (p2.BaseType = btWideChar)) or
((p1.BaseType = btUnicodeString) and ((p2.BaseType = btString) or (p2.BaseType = btPchar) or (p2.BaseType = btUnicodeString))) or
((p1.BaseType = btUnicodeString) and (p2.BaseType = btWidestring)) or
(((p1.basetype = btPchar) or (p1.BaseType = btString)) and (p2.BaseType = btWideString)or (p2.BaseType = btUnicodeString)) or
(((p1.basetype = btPchar) or (p1.BaseType = btString)) and
// the second/third term used to dangle outside the p1 check, which
// made EVERY destination type compatible with UnicodeString sources
((p2.BaseType = btWideString) or (p2.BaseType = btUnicodeString))) or
(((p1.basetype = btPchar) or (p1.BaseType = btString)) and (p2.BaseType = btWidechar)) or
(((p1.basetype = btPchar) or (p1.BaseType = btString)) and (p2.BaseType = btchar)) or
{$ENDIF}
Expand Down