mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-26 17:24:02 +00:00
fix https://github.com/nim-lang/RFCs/issues/311 remove unary slice (#16714)
This commit is contained in:
@@ -339,7 +339,7 @@ proc findMainFile(dir: string): string =
|
||||
var nimFiles = 0
|
||||
for kind, file in os.walkDir(dir):
|
||||
if kind == pcFile:
|
||||
if file.endsWith(cfgExt): return file[ .. ^(cfgExt.len+1)] & ".nim"
|
||||
if file.endsWith(cfgExt): return file[0..^(cfgExt.len+1)] & ".nim"
|
||||
elif file.endsWith(".nim"):
|
||||
if result.len == 0: result = file
|
||||
inc nimFiles
|
||||
|
||||
Reference in New Issue
Block a user