--- /dev/null
+// CS0154: The property or indexer `BugReport.MyProperty' cannot be used in this context because it lacks the `get' accessor
+// Line: 16
+
+static class BugReport
+{
+ static float MyProperty {
+ set { }
+ }
+
+ static void MyExtension (this float val)
+ {
+ }
+
+ public static void Main ()
+ {
+ MyProperty.MyExtension ();
+ }
+}
+
class ExtensionMethodGroupExpr : MethodGroupExpr, OverloadResolver.IErrorHandler
{
ExtensionMethodCandidates candidates;
- public readonly Expression ExtensionExpression;
+ public Expression ExtensionExpression;
public ExtensionMethodGroupExpr (ExtensionMethodCandidates candidates, Expression extensionExpr, Location loc)
: base (candidates.Methods.Cast<MemberSpec>().ToList (), extensionExpr.Type, loc)
if (arguments == null)
arguments = new Arguments (1);
+ ExtensionExpression = ExtensionExpression.Resolve (ec);
+ if (ExtensionExpression == null)
+ return null;
+
arguments.Insert (0, new Argument (ExtensionExpression, Argument.AType.ExtensionType));
var res = base.OverloadResolve (ec, ref arguments, ehandler ?? this, restr);