getField method
Implementation
Object? getField(String name) {
// Check if the field exists directly on this instance
if (_fields.containsKey(name)) {
return _fields[name];
}
// We throw an error if the field doesn't exist directly.
// Accessing super.fieldName where fieldName is only defined in the superclass
// isn't standard Dart behavior (you'd typically use super.getterName).
// This method is primarily for the `super.` property access visitor to get the value.
throw RuntimeD4rtException(
"Internal Error: Field '$name' not found for super access on instance of ${klass.name}. This might indicate an issue with super property access implementation.");
}