Keep incomplete constructor initializer colon location
[mono.git] / mcs / mcs / cs-parser.jay
index e6797068e895b166b737374bbdc09d9a9e35a416..684cb2caec9335100eced114292ba2ed8163ba45 100644 (file)
@@ -2169,6 +2169,12 @@ constructor_initializer
                $$ = new ConstructorThisInitializer ((Arguments) $5, GetLocation ($2));
                lbag.AddLocation ($$, GetLocation ($1), GetLocation ($3), GetLocation ($6));
          }
+       | COLON error
+         {
+               Error_SyntaxError (yyToken);      
+               $$ = new ConstructorThisInitializer (null, GetLocation ($2));
+               lbag.AddLocation ($$, GetLocation ($1));
+         }
        | error
          {
                Error_SyntaxError (yyToken);