Skip to content

Commit f4a4d48

Browse files
Fix for issue 9855 (#9859)
1 parent b4383a0 commit f4a4d48

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

src/Bicep.Core.IntegrationTests/ScenarioTests.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4245,6 +4245,19 @@ param appsettings object
42454245
result.Should().NotHaveAnyDiagnostics();
42464246
}
42474247

4248+
// https://github.com/Azure/bicep/issues/9855
4249+
[TestMethod]
4250+
public void Test_Issue9855()
4251+
{
4252+
var result = CompilationHelper.Compile(@"
4253+
/*************
4254+
* BLOCK *
4255+
**************/
4256+
");
4257+
4258+
result.Should().NotHaveAnyDiagnostics();
4259+
}
4260+
42484261
// https://github.com/Azure/bicep/issues/9469
42494262
[TestMethod]
42504263
public void Test_Issue9469()

src/Bicep.Core/Parsing/Lexer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ private SyntaxTrivia ScanMultiLineComment()
544544
var nextChar = textWindow.Peek();
545545
textWindow.Advance();
546546

547-
if (nextChar != '*')
547+
if (nextChar != '*' || textWindow.Peek() != '/')
548548
{
549549
continue;
550550
}

0 commit comments

Comments
 (0)