From c6efbc4d2cd99f190b04c583470d839f7944e7fb Mon Sep 17 00:00:00 2001 From: pierre Date: Tue, 29 Jun 1999 11:42:14 +0000 Subject: [PATCH] +bug0272; bug #269 corrected --- bugs/bug0272.pp | 34 ++++++++++++++++++++++++++++++++++ bugs/readme.txt | 7 ++++--- 2 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 bugs/bug0272.pp diff --git a/bugs/bug0272.pp b/bugs/bug0272.pp new file mode 100644 index 0000000000..145053fd37 --- /dev/null +++ b/bugs/bug0272.pp @@ -0,0 +1,34 @@ +program test_const_string; + + +function astring(s :string) : string; + +begin + astring:='Test string'+s; +end; + +procedure testvar(var s : string); +begin + writeln('testvar s is "',s,'"'); +end; + +procedure testconst(const s : string); +begin + writeln('testconst s is "',s,'"'); +end; + +procedure testvalue(s : string); +begin + writeln('testvalue s is "',s,'"'); +end; + +const + s : string = 'test'; + +begin + testvalue(astring('e')); + testconst(astring(s)); + testconst(astring(45)); + {testvar(astring);refused a compile time } +end. + diff --git a/bugs/readme.txt b/bugs/readme.txt index 3a7f2487d6..d6c87065a6 100644 --- a/bugs/readme.txt +++ b/bugs/readme.txt @@ -315,7 +315,8 @@ Fixed bugs: bug0259.pp problem with optimizer for real math (use -O1) OK 0.99.12 (PM) bug0260.pp problem with VMT generation if non virtual method has a virtual overload OK 0.99.12 (PM) - + bug0261.pp problems for assignment overloading OK 0.99.12a (PM) + bug0269.pp wrong linenumber for repeat until when type mismatch OK 0.99.12b (PM) Unproducable bugs: ------------------ @@ -350,7 +351,6 @@ bug0244.pp nested procedures can't have same name as global ones (same as bug0 bug0245.pp assigning pointers to address of consts is allowed (refused by BP !) bug0246.pp const para can be changed without error bug0252.pp typecasting not possible within typed const -bug0261.pp problems for assignment overloading bug0262.pp problems with virtual and overloaded methods bug0263.pp export directive is not necessary in delphi anymore bug0264.pp methodpointer bugs @@ -358,6 +358,7 @@ bug0265.pp nested proc with for-counter in other lex level bug0266.pp write cuts 256 char bug0267.pp parameters after methodpointer are wrong bug0268.pp crash with exceptions -bug0269.pp wrong linenumber for repeat until when type mismatch bug0270.pp unexpected eof in tp mode with (* and directives bug0271.pp abstract methods can't be assigned to methodpointers +bug0272.pp No error issued if wrong parameter in function inside a second function +