-
Notifications
You must be signed in to change notification settings - Fork 527
First try at moving isimplicit to declaration from method. #604
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
Conversation
@genuinelucifer I am discussing about IsExplicit/IsImplicit with @tritao . In the mean time, please convert your tabs to 4 spaces and add () to D->isImplicit in Parser.cpp. The latter is not a field but a function, I am pretty sure your code does not compile at the moment. You can also start with the test. We have a special test project for checking the obtained AST, CppSharp.Generator.Tests. You can see how it works in the existing tests. |
public void TestImplicitDeclaration() | ||
{ | ||
Assert.AreEqual(false, AstContext.FindFunction("testExplicitFunc").Single().IsImplicit); | ||
Assert.AreEqual(true, AstContext.FindFunction("testImplicitFunc").Single().IsImplicit); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The second assert is failing. Am I missing something about Implicit and Explicit declarations?
46bc6e0
to
b09e9b5
Compare
[Test] | ||
public void TestImplicitDeclaration() | ||
{ | ||
Assert.IsTrue(AstContext.FindClass("ImplicitCtor").First().Constructors.First(c => c.Parameters.Count == 0).IsImplicit); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please break this line - after "First(" is a good location - and I'll merge.
b09e9b5
to
d753c8d
Compare
First try at moving isimplicit to declaration from method.
@genuinelucifer thank you for your work. Let me know when you are ready for a new task. |
@ddobrev Pls provide me a new task to work on.
|
@genuinelucifer since you are more experienced now compared to 3 or 4 months ago, would you like to try the one for StringBuilder (#508) again? |
@ddobrev I'll definitely try that one again. I guess their will be a few
doubts in that issue. I'll try first and then ask you about those.
|
I have yet to add a test.
.
Please see if I am going in right direction or not.
Also, i was a bit confused by the 2 fields
IsImplicit
andIsExplicit
. I think they should be opposite of each other but they are implemented separately. Also I could not find a WalkRecord which fills the IsExplicit field.