[fpc-pascal] Objective-C mode switch overrides open arrays?
Ryan Joseph
genericptr at gmail.com
Wed Mar 4 10:12:18 CET 2020
The for loop thinks the open array of NSObject is an ObjectiveC array and thus gives me an error. Is this a bug?
=====================
{$mode objfpc}
{$modeswitch objectivec2}
program test;
uses
CocoaAll;
procedure Test(input: array of NSObject);
var
obj: NSObject;
begin
// Incompatible types: got "{Open} Array Of NSObject" expected "NSFastEnumerationProtocol"
for obj in input do
;
end;
begin
end.
Regards,
Ryan Joseph
More information about the fpc-pascal
mailing list