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

Fixed typedef inside function. Fixes #272 #347

Merged
merged 1 commit into from
Nov 17, 2017
Merged

Fixed typedef inside function. Fixes #272 #347

merged 1 commit into from
Nov 17, 2017

Conversation

yulvil
Copy link
Contributor

@yulvil yulvil commented Nov 11, 2017

For #272

This change is Reviewable

@yulvil
Copy link
Contributor Author

yulvil commented Nov 11, 2017

@elliotchance I am still trying to come up with tests for this change, but all the tests require #322 to be fixed first.

It is up to you to decide if you want to wait for #322.

@codecov
Copy link

codecov bot commented Nov 11, 2017

Codecov Report

Merging #347 into master will increase coverage by <.01%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #347      +/-   ##
==========================================
+ Coverage   81.62%   81.62%   +<.01%     
==========================================
  Files         142      142              
  Lines        6013     6014       +1     
==========================================
+ Hits         4908     4909       +1     
  Misses        885      885              
  Partials      220      220
Impacted Files Coverage Δ
transpiler/variables.go 85% <66.66%> (+0.07%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1618013...1208fba. Read the comment docs.

@Konstantin8105
Copy link
Contributor

Could you check the result of that example:

int main(){
    typedef int INT;
    INT i = 42;
    return 0;
}

Is look like that :

type INT int // <---- Outside of function
func main(){
    var i INT = 42;
}

@yulvil
Copy link
Contributor Author

yulvil commented Nov 12, 2017

@Konstantin8105 Hi. This is an easy fix that will fix most of the typedef cases.

I opened another issue #346 to fix the rare cases (?) where a typedef is defined multiple times (with different target types) within the same compilation unit.

@Konstantin8105
Copy link
Contributor

@yulvil Hello, yes you are right. Now,c2go haven't any support of typedef types. It is more then nothing. And about - how to inject into function, we will in next PR.

@elliotchance
Copy link
Owner

I don't see any test cases for this so I'm not sure what has changed?


Reviewed 1 of 1 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

@yulvil
Copy link
Contributor Author

yulvil commented Nov 16, 2017

@elliotchance I need to fix #322 before I can write a test case that is working.

@elliotchance
Copy link
Owner

Do you want it merged or do you want me to wait for #322?


Review status: :shipit: all files reviewed at latest revision, all discussions resolved, all commit checks successful.


Comments from Reviewable

@yulvil
Copy link
Contributor Author

yulvil commented Nov 17, 2017

@elliotchance Please merge. I think it is safe. I will provide tests later.

@elliotchance elliotchance changed the title Fixed typedef inside function Fixed typedef inside function. Fixes #272 Nov 17, 2017
@elliotchance elliotchance merged commit 3e641c1 into elliotchance:master Nov 17, 2017
@yulvil yulvil deleted the 272typedef branch November 17, 2017 00:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants