summaryrefslogtreecommitdiff
path: root/tests/webtbf
diff options
context:
space:
mode:
authorflorian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2>2020-03-06 10:10:58 +0000
committerflorian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2>2020-03-06 10:10:58 +0000
commite5952ca9962eff079dff2d553ad3505ed9322829 (patch)
treef1620ac79b1cd34f35ba8b6915f6400cf403d896 /tests/webtbf
parente86a6afc62a864a47570ab781d87df3297ff5761 (diff)
downloadfpc-e5952ca9962eff079dff2d553ad3505ed9322829.tar.gz
* fix precedence of IS operator, resolves #35909
git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@44266 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'tests/webtbf')
-rw-r--r--tests/webtbf/tw35909.pp12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/webtbf/tw35909.pp b/tests/webtbf/tw35909.pp
new file mode 100644
index 0000000000..529378ce42
--- /dev/null
+++ b/tests/webtbf/tw35909.pp
@@ -0,0 +1,12 @@
+{ %fail% }
+{$mode delphi}
+program IS_Precedence;
+uses
+ Classes;
+var
+ O1, O2: TObject;
+begin
+ O1 := TComponent.Create(nil);
+ O2 := TObject.Create;
+ Writeln(O1 is TComponent or O2 is TComponent); // <<< should not compile because OR has precedence before IS
+end.