Skip to content

Commit ca07eb0

Browse files
committed
[PCompiler] Fix incorrect string matching when excluding imported test cases
1 parent 5da26ab commit ca07eb0

File tree

1 file changed

+3
-1
lines changed
  • Src/PCompiler/CompilerCore/TypeChecker

1 file changed

+3
-1
lines changed

Src/PCompiler/CompilerCore/TypeChecker/Scope.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
using System;
12
using System.Collections.Generic;
23
using System.Diagnostics;
4+
using System.IO;
35
using System.Linq;
46
using Antlr4.Runtime;
57
using Plang.Compiler.TypeChecker.AST;
@@ -603,7 +605,7 @@ public SafetyTest Put(string name, PParser.SafetyTestDeclContext tree)
603605
string filePath = config.LocationResolver.GetLocation(tree).File.FullName;
604606
foreach (var dependencyPath in config.ProjectDependencies)
605607
{
606-
if (filePath.StartsWith(dependencyPath))
608+
if (filePath.StartsWith($"{dependencyPath}{Path.DirectorySeparatorChar}"))
607609
{
608610
return null;
609611
}

0 commit comments

Comments
 (0)