Elements 10 build error

Hi,

I’ve installed Elements 10 and have problems with build my code - I’m still using sugar because there is no time to change it.

namespace ConsoleApplication1;

interface

uses
Sugar.*;

type
Class1 = public class
private
protected
public
method Test(aTest: Sugar.String);
end;

implementation

method Class1.Test(aTest: String);
begin

end;

end.

Error (E51) Implementation for method “method Test(aTest: Sugar.String)” is missing
Error (E52) Type “Class1” does not contain a declaration that matches this method signature:
Error (E58) Duplicate method “method Class1.Test(aTest: String)” with same signature

Using latest official version everything is ok.

Hi,

v10 requires that the type name in the interface and implementation match exactly. IE you either use Sugar.String in both, or String in both, but not Sugar.String vs String.

I have uses sugar.* and it works in 9.x Elements - from version 10 I have to change in all methods as i understood ?

You have to change interface and implementation to use consistent (i.e. the same) type name, correct. Either drop the “Sugar.” prefix from one, or add it to the other.

OK.