peter 20 năm trước cách đây
mục cha
commit
7cb3c3de10
1 tập tin đã thay đổi với 19 bổ sung0 xóa
  1. 19 0
      tests/webtbs/tw3840.pp

+ 19 - 0
tests/webtbs/tw3840.pp

@@ -0,0 +1,19 @@
+{ Source provided for Free Pascal Bug Report 3840 }
+{ Submitted by "Alexey Barkovoy" on  2005-03-27 }
+{ e-mail: [email protected] }
+
+{$mode objfpc}
+
+const
+  sConst =  'X';
+
+procedure Do1(const w: PWideChar);
+begin
+  writeln(Widestring(w));
+end;
+
+begin
+  Do1(sConst); //Error: Incompatible type for arg no. 1: Got "Char", expected "PWideChar"
+  Do1('W');    //Error: Incompatible type for arg no. 1: Got "Char", expected "PWideChar"
+  Do1('WW');   // SUCCEEDED
+end.