spotify / dataenum

Algebraic data types in Java.
Apache License 2.0
166 stars 16 forks source link

Allow `result` and `builder` as field names #27

Closed bndbsh closed 5 years ago

bndbsh commented 5 years ago

The generated hashCode and toString use local variables called result and builder respectively, causing issues if fields have the same name. Prefixing field access with this solves the issue.

codecov[bot] commented 5 years ago

Codecov Report

Merging #27 into master will not change coverage. The diff coverage is 75%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master      #27   +/-   ##
=========================================
  Coverage     93.95%   93.95%           
  Complexity      209      209           
=========================================
  Files            23       23           
  Lines           645      645           
  Branches         93       93           
=========================================
  Hits            606      606           
  Misses           30       30           
  Partials          9        9
Impacted Files Coverage Δ Complexity Δ
...um/processor/generator/value/ValueTypeFactory.java 97.71% <75%> (ø) 49 <0> (ø) :arrow_down:

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 45a7832...8d3b068. Read the comment docs.

pettermahlen commented 5 years ago

LGTM!