Compiler error XS9067 - CLIPPER calling convention (version 2.0.0.9)

This forum is meant for questions and discussions about the X# language and tools
Post Reply
Thomas
Posts: 93
Joined: Thu Oct 25, 2018 11:39 am

Compiler error XS9067 - CLIPPER calling convention (version 2.0.0.9)

Post by Thomas »

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
Attachments
ClipperCallingConventionTest.zip
(20.5 KiB) Downloaded 27 times
ClipperCallingConventionTestParams.zip
(19.88 KiB) Downloaded 30 times
User avatar
robert
Posts: 4266
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Compiler error XS9067 - CLIPPER calling convention (version 2.0.0.9)

Post by robert »

Thomas,
There is a problem in the beta 9 compiler when you declare a method in an interface with clipper calling convention.
In your case you have a method without parameters and the compiler option /vo5 will turn that into a method with clipper calling convention.
We have it fixed already in our internal development build.
I will send you a fix tomorrow. Is that Ok ?

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
Thomas
Posts: 93
Joined: Thu Oct 25, 2018 11:39 am

Compiler error XS9067 - CLIPPER calling convention (version 2.0.0.9)

Post by Thomas »

Hi Robert,
that would be great! Thank you!
Would you mind to send the fix also to my colleagues Mathias Koch and Frank Feinauer (they both should also be FOX subscribers) because I'm out of office until next Thursday?

Thomas
User avatar
robert
Posts: 4266
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Compiler error XS9067 - CLIPPER calling convention (version 2.0.0.9)

Post by robert »

Thomas,
I am sorry but that is not possible ;)
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
Thomas
Posts: 93
Joined: Thu Oct 25, 2018 11:39 am

Compiler error XS9067 - CLIPPER calling convention (version 2.0.0.9)

Post by Thomas »

Robert, could you please send me the fix? Thank you..
Thomas
Post Reply