nested static methods in Fusion not properly translated within C++ code #218
Closed
mittelmark
started this conversation in
General
Replies: 2 comments
-
|
Thanks for reporting! The issue was for passing collection storage. Fixed in 5b61d29 BTW, you can simplify your code to: public static List<bool>() IsNa(List<float> x) {
List<bool>() b;
foreach (float f in x)
b.Add(Math.IsNaN(f));
return b;
}
public static List<int>() Which (List<bool> b) {
List<int>() w;
for (int i = 0; i < b.Count; i++) {
if (b[i])
w.Add(i);
}
return w;
} |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Thanks, that works just fine. Checked as well Swig now. The I will not wrap parts of glib with SWIG to continue with Lists within other languages targeted by SWIG. But that is another story ... |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
let's assume i have the following code:
The code works in all languages I tested: C, C#, D, Java, JavaScript, TypeScript and Python but not in C++. The nesting is not properly transpiled. I did the workaround with 2 variables. The translated C++ code code for the nas2 line looks like:
May be this can be fixed. Otherwise I never nest ;)
Should I do a issue item?
Best,
Detlef
Beta Was this translation helpful? Give feedback.
All reactions