Fix static modifier for synthetic fields coming from summaries.

R=jmesserly@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/2439023002 .
This commit is contained in:
Paul Berry 2016-10-21 11:09:11 -07:00
parent 02a14cd937
commit f1aee7cf68
2 changed files with 3 additions and 0 deletions

View file

@ -1236,6 +1236,7 @@ class ClassElementImpl extends AbstractClassElementImpl
field.synthetic = true;
field.final2 = e.kind == UnlinkedExecutableKind.getter;
field.type = fieldType;
field.static = e.isStatic;
} else {
field.final2 = false;
}

View file

@ -1259,6 +1259,8 @@ abstract class AbstractResynthesizeTest extends AbstractSingleUnitTest {
} else if (modifier == Modifier.STATIC) {
if (element is ExecutableElement) {
return element.isStatic;
} else if (element is FieldElement) {
return element.isStatic;
}
return false;
} else if (modifier == Modifier.SYNTHETIC) {