svenbarth
f9957f30a5
* fix for Mantis #38771 : the owner of the procdef might be Nil in case of a specialization (that virtual can't be used on generics is caught later on)
...
+ added test
git-svn-id: trunk@49228 -
2021-04-18 14:01:09 +00:00
svenbarth
2885d3ab56
* fix for Mantis #37426 : don't allow an instance function of a type helper to be used on the type instead of a concrete value
...
+ added test
git-svn-id: trunk@49102 -
2021-04-02 15:25:01 +00:00
florian
60c8b71bae
* string constants have a size of 0, resolves #38504
...
git-svn-id: trunk@48759 -
2021-02-21 18:46:00 +00:00
florian
ecce39a3b2
+ throw a warning in ISO mode if a constant string is assigned to a char and the sizes do not match, resolves #38439
...
git-svn-id: trunk@48563 -
2021-02-09 20:48:27 +00:00
florian
b1f7fb4ba1
* test for already fixed issue #24434
...
git-svn-id: trunk@48516 -
2021-02-06 12:53:04 +00:00
florian
9803318fef
* give a proper error if macros are too deeply nested
...
git-svn-id: trunk@48357 -
2021-01-23 21:29:37 +00:00
florian
7f775abb6d
* throw a proper error if a contructur has a type parameter in delphi mode, resolves #37217
...
git-svn-id: trunk@48113 -
2021-01-08 14:19:19 +00:00
svenbarth
d854d18bd9
* instead of blindly consuming whatever comes next trigger an explicit error if the parsed expression does not match for "INDEX ordexpr" or "NAME strexpr"
...
+ added tests
git-svn-id: trunk@47995 -
2021-01-02 23:23:08 +00:00
florian
cbec395907
* test needs -Cg to trigger the warning
...
git-svn-id: trunk@47661 -
2020-12-01 21:54:45 +00:00
florian
8b06b43c1a
* meanwhile all linux targets support the checkpointer directive
...
git-svn-id: trunk@47659 -
2020-12-01 21:18:47 +00:00
svenbarth
67d2ecc09f
* with the recent ShortString changes this test is no longer needed as it was added exactly to check the condition I removed, so disable it for 3.2.1 and newer (as I want to merge these changes back to fixes)
...
git-svn-id: trunk@47655 -
2020-12-01 06:39:31 +00:00
florian
60bd9c5ba0
* write a proper error message if types are read/written which are not supported in iso mode, resolves #37763
...
git-svn-id: trunk@46885 -
2020-09-17 19:58:55 +00:00
florian
120825d1d6
* do not throw an internal error on illegal assembler expressions, resolves #37439
...
git-svn-id: trunk@46499 -
2020-08-19 21:09:44 +00:00
florian
18b8b9c566
* do not apply range test optimization if the variable is a string being compared against a char constants, resolves #37476
...
git-svn-id: trunk@46453 -
2020-08-15 18:29:26 +00:00
florian
1ba8255af0
* do not try to unroll a loop if previously an error was thrown, resolves #37475
...
git-svn-id: trunk@46435 -
2020-08-14 18:10:56 +00:00
svenbarth
055cfc1771
* added test for Mantis #36014 which is already fixed (also in 3.2.0)
...
git-svn-id: trunk@46219 -
2020-08-03 21:53:24 +00:00
florian
f542ee7b92
* do not throw an internal error if an errorneous type is passed to str, resolves #37462
...
git-svn-id: trunk@45983 -
2020-08-01 21:11:35 +00:00
florian
6f661e44d0
* do not throw an internal error later on in case of a recursive call, if the declaration of the function was faulty, resolves #37460
...
git-svn-id: trunk@45975 -
2020-07-31 21:03:35 +00:00
florian
0cb21e8338
+ test for last commit
...
git-svn-id: trunk@45773 -
2020-07-11 20:31:00 +00:00
svenbarth
eaa2a2006c
* fix for Mantis #37272 : also allow the empty set for dynamic array parameters; Delphi probably started to allow that together with array constructors.
...
+ added tests
git-svn-id: trunk@45706 -
2020-06-27 22:33:31 +00:00
svenbarth
a467332187
* fix for Mantis #36975 : arraydefs are not allowed for generic types (this is only used for type declarations; for specializing constant strings which are char arrays are still allowed)
...
+ added test
git-svn-id: trunk@45089 -
2020-04-26 11:46:10 +00:00
florian
bc3131688a
* fix precedence of IS operator, resolves #35909
...
git-svn-id: trunk@44266 -
2020-03-06 10:10:58 +00:00
florian
c146aecc01
* throw an error if the forward interface type and the actual interface type do not match, resolves #36720
...
git-svn-id: trunk@44230 -
2020-02-21 20:35:27 +00:00
florian
b7afb2431c
* do not allow constraints in headers of procedure implementations in delphi mode, resolves #36584
...
* better error message if a constraint is found at a wrong location
git-svn-id: trunk@44174 -
2020-02-14 20:56:55 +00:00
svenbarth
147559349b
* fix for Mantis #36652 : gracefully handle the error if one tries to implement a method of a type from another unit
...
+ added test
git-svn-id: trunk@44170 -
2020-02-14 16:48:58 +00:00
svenbarth
1407aa2b4b
* fix for Mantis #36631 : it's an error if a POINT after an array is not followed by an identifier
...
+ added tests
git-svn-id: trunk@44082 -
2020-02-01 17:51:46 +00:00
florian
007df5d0fa
* fix for #36554
...
git-svn-id: trunk@43913 -
2020-01-11 21:15:19 +00:00
florian
4de6b3e6b9
* do not crash when an unsupported code page is encountered, resolves #35581
...
git-svn-id: trunk@43764 -
2019-12-23 21:44:50 +00:00
florian
ac6e4f59c6
* better error recovery, resolves #36397
...
git-svn-id: trunk@43653 -
2019-12-05 20:46:50 +00:00
florian
d8f1aacd78
* better error recovery, resolves #36377
...
git-svn-id: trunk@43612 -
2019-11-29 22:13:17 +00:00
florian
fb4b1cbf35
* warn only in delphi mode if an explicit enumeration value exceeds the range, relaxes r43191
...
git-svn-id: trunk@43590 -
2019-11-25 20:58:20 +00:00
svenbarth
fdeaacac21
* fix for Mantis #36223 : when parsing a helper type its extendeddef might be Nil
...
+ added test
git-svn-id: trunk@43346 -
2019-11-01 15:02:31 +00:00
florian
626ef4ae0c
* give an error if an explicit enumeration valid exceeds the valid range, resolves #34633
...
git-svn-id: trunk@43191 -
2019-10-13 15:48:21 +00:00
svenbarth
beb606be13
* fix for Mantis #36114 : when converting a static class field to a global variable the varspez of the field needs to be respected
...
+ added test
git-svn-id: trunk@43116 -
2019-10-03 16:39:40 +00:00
svenbarth
b0b2218cca
* fix for Mantis #35981 : ensure that the "specialize" token is only really used in non-Delphi modes
...
git-svn-id: trunk@42776 -
2019-08-23 14:59:20 +00:00
Jonas Maebe
3fb7c19482
- removed tests as modern Delphi versions behave differently (mantis #35886 )
...
git-svn-id: trunk@42512 -
2019-07-28 12:03:40 +00:00
svenbarth
6cde8ab4cb
* fix for Mantis #35866 : parse_paras does not check whether the expressions are really constant, so check that manually
...
+ added test
git-svn-id: trunk@42469 -
2019-07-20 19:45:59 +00:00
Jonas Maebe
c038e4c3f2
* relaxation of r42272: again only show warnings rather than errors for
...
out-of-range constants, because of the comments mentioned in #35753
(except for enums, as apparently Delphi does the same)
* added range check warnings about explicit type casts that throw away
bits (e.g. byte($fff)), without giving warnings for most common cases
(like cardinal(-1))
* fixed masking/sign exting constant array indices (must be based on index
range type size/signedness rather than on array size/"signedness")
git-svn-id: trunk@42275 -
2019-06-23 14:12:33 +00:00
Jonas Maebe
3a2fe24f49
* report range errors for assigning out-of-range constants to enums in
...
Delphi mode (mantis #35671 )
* always give an error (rather than only a warning in case range checking
is disabled) when assigning an out-of-range constant to an ordinal variable
whose type does not span the entire range that its bits can hold (because
the result is undefined and FPC's optimisers rely on variables only
holding values that are valid for the type)
git-svn-id: trunk@42272 -
2019-06-22 17:30:42 +00:00
svenbarth
e6add40495
* fix for Mantis #35348 : correctly handle symbols that aren't parameter types (e.g. default values)
...
+ added test
git-svn-id: trunk@41869 -
2019-04-14 20:47:47 +00:00
Jonas Maebe
aba3f8f162
* fixed over-eager rejection of tobjecttype.fieldname expression after r40785
...
(mantis #35149 )
git-svn-id: trunk@41474 -
2019-02-25 21:17:24 +00:00
Jonas Maebe
b2b34338e5
* give an error when trying to call an object instance method via a type node
...
(mantis #34821 )
git-svn-id: trunk@40785 -
2019-01-06 15:21:36 +00:00
svenbarth
04bbfd1746
* fix for Mantis #27378 : save and (more importantly) restore verbosity when switching a unit
...
+ added test
git-svn-id: trunk@40750 -
2019-01-03 20:31:34 +00:00
florian
22365a1f57
+ test for #27543 which is fixed meanwhile
...
git-svn-id: trunk@40731 -
2019-01-01 16:16:54 +00:00
svenbarth
dada756828
* also enable published for TObjA so that the test fails for the correct reason
...
git-svn-id: trunk@40704 -
2018-12-29 19:23:19 +00:00
svenbarth
e28dff523a
* with the change regarding property access lists this test is no longer considered correct
...
git-svn-id: trunk@40658 -
2018-12-26 11:26:08 +00:00
svenbarth
60adebfe28
* Mantis #34691 is fixed by previous change regarding property access list
...
git-svn-id: trunk@40657 -
2018-12-26 11:26:04 +00:00
svenbarth
251dfb6776
* don't allow constants of the record type that is currently being parsed; this would fail as soon as another field is added after the constant declaration
...
+ added tests
Note: unlike what bug report 27880 suggests Delphi also does *NOT* allow this (at least a current Delphi Tokyo) and fails with a "type is not completely defined" error, so this test belongs into the "failure" category
git-svn-id: trunk@40285 -
2018-11-11 22:08:29 +00:00
svenbarth
a8b2ad31d1
* fix for Mantis #34355 : correctly check whether the array constructor is empty (aka []) or not
...
git-svn-id: trunk@39882 -
2018-10-07 12:25:24 +00:00
svenbarth
b94a8c93a5
* test (for Mantis #5516 ; 3531 is the old bug ID) is valid now that we have dynamic array initializers
...
git-svn-id: trunk@39105 -
2018-05-24 19:56:35 +00:00