Skip to content

Commit 9eb75cb

Browse files
[compiler] Support static interface constructor
1 parent e6963b6 commit 9eb75cb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Compiler/src/Compiler/XSharpCodeAnalysis/Parser/XSharpParseErrorAnalysis.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ public override void ExitConstructor([NotNull] XSharpParser.ConstructorContext c
552552
_parseErrors.Add(new ParseErrorData(context.StmtBlk, ErrorCode.ERR_ExternHasBody, "Constructor"));
553553
}
554554
}
555-
if (context.isInInterface())
555+
if (context.isInInterface() && context.Modifiers?.STATIC().Length == 0)
556556
{
557557
_parseErrors.Add(new ParseErrorData(context.c1, ErrorCode.ERR_InterfacesCantContainConstructors));
558558
}

0 commit comments

Comments
 (0)