projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[mcs] Allow properties and indexers of by-ref values to be set without setter
[mono.git]
/
mcs
/
mcs
/
ecore.cs
diff --git
a/mcs/mcs/ecore.cs
b/mcs/mcs/ecore.cs
index 490bcfb518e5c4a78535f71c07bc2e6c8dde9ce4..34ff9a30dab3cb423f4b9f64b7a7640d67a2b56a 100644
(file)
--- a/
mcs/mcs/ecore.cs
+++ b/
mcs/mcs/ecore.cs
@@
-7394,6
+7394,11
@@
namespace Mono.CSharp {
if (ResolveAutopropertyAssignment (rc, right_side))
return this;
if (ResolveAutopropertyAssignment (rc, right_side))
return this;
+ if (best_candidate.MemberType.Kind == MemberKind.ByRef) {
+ getter = CandidateToBaseOverride (rc, best_candidate.Get);
+ return ByRefDereference.Create(this).Resolve(rc);
+ }
+
rc.Report.Error (200, loc, "Property or indexer `{0}' cannot be assigned to (it is read-only)",
GetSignatureForError ());
return null;
rc.Report.Error (200, loc, "Property or indexer `{0}' cannot be assigned to (it is read-only)",
GetSignatureForError ());
return null;