Compiler error XS9067 - CLIPPER calling convention (version 2.0.0.9)
Posted: Thu Feb 07, 2019 1:45 pm
Hi All,
X# version 2.0.0.9
Dialect Vulcan.NET
(X# runtime)
With version 2.0.0.9 we now get a new error XS9067 when we compile our solution (this was no error in version 2.0.0.8 ).
I saw in the Whatsnew-Document a comment about changes in the compiler „Added compiler error when specifying default parameter values for methods/functions with clipper calling convention“, but I’m not sure if that relates to my problem.
Description:
We have a project with interface definitions, compiler option “Treat missing types as USUAL“ (vo15) is set to true.
PUBLIC INTERFACE ISQLSelect
METHOD Execute(pArgs)
END INTERFACE
In an other project we have a class that implements the interface. Compiler option “Treat missing types as USUAL“ (vo15) is set to true.
PUBLIC CLASS SubSqlSelect IMPLEMENTS ISQLSelect
METHOD Execute(pArgs)
// Do something...
END CLASS
So we get an compiler error when we build the project with the implementation:
Error XS9067 Interface method LibInterfaces.ISQLSelect.Execute(XSharp.__Usual) and implementation LibSql.SubSqlSelect.Execute(params XSharp.__Usual[]) have different calling conventions.
As you describe in the „X# Compiler Errors and Warnings“ documentation for error XS9067, this should depend on different settings of compiler option /vo5 ((Implicit CLIPPER calling convention) ) in the projects.
But we get the error even when both projects have the same settings for this compiler option (no matter if set to false or true).
Maybe the problem is the compiler generated code for the interface?
Version 2.0.0.9
public interface ISQLSelect
{
__Usual Execute(__Usual pArgs);
}
Version 2.0.0.8
public interface ISQLSelect
{
__Usual Execute([CompilerGenerated] params __Usual[] Xs$Args);
}
I get the same error with your example code in the error XS9067 description (the only difference is that there is a zero-argument method).
I’ve attached samples for you to reproduce it.
Regards
Thomas
X# version 2.0.0.9
Dialect Vulcan.NET
(X# runtime)
With version 2.0.0.9 we now get a new error XS9067 when we compile our solution (this was no error in version 2.0.0.8 ).
I saw in the Whatsnew-Document a comment about changes in the compiler „Added compiler error when specifying default parameter values for methods/functions with clipper calling convention“, but I’m not sure if that relates to my problem.
Description:
We have a project with interface definitions, compiler option “Treat missing types as USUAL“ (vo15) is set to true.
PUBLIC INTERFACE ISQLSelect
METHOD Execute(pArgs)
END INTERFACE
In an other project we have a class that implements the interface. Compiler option “Treat missing types as USUAL“ (vo15) is set to true.
PUBLIC CLASS SubSqlSelect IMPLEMENTS ISQLSelect
METHOD Execute(pArgs)
// Do something...
END CLASS
So we get an compiler error when we build the project with the implementation:
Error XS9067 Interface method LibInterfaces.ISQLSelect.Execute(XSharp.__Usual) and implementation LibSql.SubSqlSelect.Execute(params XSharp.__Usual[]) have different calling conventions.
As you describe in the „X# Compiler Errors and Warnings“ documentation for error XS9067, this should depend on different settings of compiler option /vo5 ((Implicit CLIPPER calling convention) ) in the projects.
But we get the error even when both projects have the same settings for this compiler option (no matter if set to false or true).
Maybe the problem is the compiler generated code for the interface?
Version 2.0.0.9
public interface ISQLSelect
{
__Usual Execute(__Usual pArgs);
}
Version 2.0.0.8
public interface ISQLSelect
{
__Usual Execute([CompilerGenerated] params __Usual[] Xs$Args);
}
I get the same error with your example code in the error XS9067 description (the only difference is that there is a zero-argument method).
I’ve attached samples for you to reproduce it.
Regards
Thomas