Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugs in the generated sample code #6

Open
tsdh opened this issue Mar 26, 2014 · 2 comments
Open

Bugs in the generated sample code #6

tsdh opened this issue Mar 26, 2014 · 2 comments
Assignees
Labels

Comments

@tsdh
Copy link

tsdh commented Mar 26, 2014

In the generated Java code, the Order member TransactTm ends in a lower-case "m", but in the constructor you access it as TransactTM ending in a capital "M".

In C# and C++, a class Foo must not have a member that's also called Foo. Thus this C# line and this C++ line (and probably more) will give compile errors.

The C++ code won't compile because of multiple reasons. And defining everything including constructors in a header is a no-no anyway.

So is the goal generating code that actually compiles and works, or is being syntactically similar to Java/C#/C++ enough?

@kevinlano
Copy link
Contributor

The transformation should generate correct code. The C++ code

for test1 does compile correctly under Visual Studio, apart from the

Tm/TM problem.

Kevin


From: Tassilo Horn [email protected]
Sent: 26 March 2014 10:01
To: TransformationToolContest/ttc2014-fixml
Cc: Lano, Kevin
Subject: [ttc2014-fixml] Bugs in the generated sample code (#6)

In the generated Java code, the Order member TransactTmhttps://github.com/TransformationToolContest/ttc2014-fixml/blob/master/test_cases/test1java.txt#L4 ends in a lower-case "m", but in the constructorhttps://github.com/TransformationToolContest/ttc2014-fixml/blob/master/test_cases/test1java.txt#L17 you access it as TransactTM ending in a capital "M".

In C#, a class Foo must not have a member that's also called Foo. Thus this linehttps://github.com/TransformationToolContest/ttc2014-fixml/blob/master/test_cases/test2csharp.txt#L163 (and probably more) will give compile errors.

The C++ code won't compile because of multiple reasons. And defining everything including constructors in a header is a no-no anyway.

So is the goal generating code that actually compiles and works, or is being syntactically similar to Java/C#/C++ enough?

Reply to this email directly or view it on GitHubhttps://github.com//issues/6.

@tsdh
Copy link
Author

tsdh commented Mar 26, 2014

@kevinlano Yeah, test2 (not test1) doesn't compile with C# and C++ because of members named like their enclosing type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants