|
|
Re: Generating duplicate method bodies in AbstractModelInferrer [message #1805359 is a reply to message #1805339] |
Fri, 12 April 2019 13:49 |
Ben Holland Messages: 34 Registered: April 2019 |
Member |
|
|
I'm confused by your answer. How would adding a third resolve one of the first two not being generated? Let me make the example a little more explict.
val function : model.functions.get(0);
it.members += toMethod(function.name + "_1", someReturnType) [
it.body = function.expression;
]
it.members += toMethod(function.name + "_2", someReturnType) [
it.body = function.expression;
]
generates:
int foo_1(){
return 1 + 1;
}
int foo_2();
The problem is that after the expression has been inferred once it is not inferred a second time and the body generated is empty. I can't seem to reuse any part of the AST in the AbstractModelInferrer. Is it somehow getting marked as being inferred and then ignored for the second use?
[Updated on: Fri, 12 April 2019 13:51] Report message to a moderator
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04937 seconds