Index: runtime/lib/mirrors.cc |
diff --git a/runtime/lib/mirrors.cc b/runtime/lib/mirrors.cc |
index 24c952393ccb79ba4fe72c51ad6ab1e6fd9f204a..d68e758aa24f20963ac6c42fbdff122ce1938060 100644 |
--- a/runtime/lib/mirrors.cc |
+++ b/runtime/lib/mirrors.cc |
@@ -1077,7 +1077,7 @@ DEFINE_NATIVE_ENTRY(ClassMirror_members, 3) { |
Field& field = Field::Handle(); |
for (intptr_t i = 0; i < num_fields; i++) { |
field ^= fields.At(i); |
- if (!field.is_synthetic()) { |
+ if (field.is_reflectable()) { |
member_mirror = CreateVariableMirror(field, owner_mirror); |
member_mirrors.Add(member_mirror); |
} |
@@ -1172,7 +1172,7 @@ DEFINE_NATIVE_ENTRY(LibraryMirror_members, 2) { |
} |
} else if (entry.IsField()) { |
const Field& field = Field::Cast(entry); |
- if (!field.is_synthetic()) { |
+ if (field.is_reflectable()) { |
member_mirror = CreateVariableMirror(field, owner_mirror); |
member_mirrors.Add(member_mirror); |
} |
@@ -1609,7 +1609,7 @@ DEFINE_NATIVE_ENTRY(ClassMirror_invokeSetter, 4) { |
return result.raw(); |
} |
- if (field.is_final()) { |
+ if (field.is_final() || !field.is_reflectable()) { |
ThrowNoSuchMethod(AbstractType::Handle(klass.RareType()), |
internal_setter_name, |
setter, |
@@ -1906,7 +1906,7 @@ DEFINE_NATIVE_ENTRY(LibraryMirror_invokeSetter, 4) { |
return result.raw(); |
} |
- if (field.is_final()) { |
+ if (field.is_final() || !field.is_reflectable()) { |
ThrowNoSuchMethod(Instance::null_instance(), |
internal_setter_name, |
setter, |