Skip to content

Commit

Permalink
Resolve const struct types. Fixes #807 (#808)
Browse files Browse the repository at this point in the history
Call CleanCType before searching for a matching struct. This gets rid of the const qualifier.
  • Loading branch information
andybalholm authored and elliotchance committed Dec 2, 2018
1 parent 2b2a011 commit 121176a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions transpiler/variables.go
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,7 @@ func transpileMemberExpr(n *ast.MemberExpr, p *program.Program) (
}

lhsType = types.GenerateCorrectType(lhsType)
lhsType = types.CleanCType(lhsType)

preStmts, postStmts = combinePreAndPostStmts(preStmts, postStmts, newPre, newPost)

Expand Down

0 comments on commit 121176a

Please sign in to comment.