diff --git a/.gitattributes b/.gitattributes index 81da24f7bb..625aeca6df 100644 --- a/.gitattributes +++ b/.gitattributes @@ -10240,6 +10240,7 @@ tests/webtbs/tw15467.pp svneol=native#text/pascal tests/webtbs/tw15500.pp svneol=native#text/plain tests/webtbs/tw15504.pp svneol=native#text/plain tests/webtbs/tw15530.pp svneol=native#text/pascal +tests/webtbs/tw15607.pp svneol=native#text/plain tests/webtbs/tw1567.pp svneol=native#text/plain tests/webtbs/tw1573.pp svneol=native#text/plain tests/webtbs/tw1592.pp svneol=native#text/plain diff --git a/compiler/pexpr.pas b/compiler/pexpr.pas index 7c091f6d4f..dfd2486757 100644 --- a/compiler/pexpr.pas +++ b/compiler/pexpr.pas @@ -2020,7 +2020,10 @@ implementation begin consume(_POINT); if (p1.resultdef.typ=pointerdef) and - (m_autoderef in current_settings.modeswitches) then + (m_autoderef in current_settings.modeswitches) and + { don't auto-deref objc.id, because then the code + below for supporting id.anyobjcmethod isn't triggered } + (p1.resultdef<>objc_idtype) then begin p1:=cderefnode.create(p1); do_typecheckpass(p1); diff --git a/tests/webtbs/tw15607.pp b/tests/webtbs/tw15607.pp new file mode 100644 index 0000000000..0867171d8f --- /dev/null +++ b/tests/webtbs/tw15607.pp @@ -0,0 +1,9 @@ +{ %norun } + +{$mode delphi}{$modeswitch objectivec1} + +var + o: id; +begin + o.description; +end.