Open Warpten opened 6 years ago
GetMethodBody into ResolveField?
basic autogenerated getter body
ldloc.0
ldflda <prop>k_BackingField
ret
[CommpilerGenerated]
is applied to the getter and the backing field
ditched for 1.0
This would be fixed by ref returns properties but auto implemented ref properties are not implemented in the language (and that would ban setters, which is annoying)
Back in 1.0
This is not a pretty solution but it would help avoiding the issue of value type getters returning temporary copies of the underlying types. The problem is that autogenerated getters typically retrieve a field named
<prop>k_BackingField
, (IsSpecialName
returns true) which is compiler-specific. So not exactly portable.The idea is to not limit the user to reference type substructures: