deprecated ospaths (#9665)

This commit is contained in:
Andreas Rumpf 2018-11-09 16:36:49 +01:00 • committed by GitHub
commit 8d850f7a69
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 838 additions and 811 deletions

View file

@ -85,6 +85,7 @@ proc initDefines*(symbols: StringTableRef) =
defineSymbol("nimHasUserErrors")
defineSymbol("nimUncheckedArrayTyp")
defineSymbol("nimHasTypeof")
defineSymbol("nimErrorProcCanHaveBody")
defineSymbol("nimHasNilSeqs")
for f in low(Feature)..high(Feature):

View file

@ -1,6 +1,6 @@
import
intsets, ast, idents, algorithm, renderer, parser, ospaths, strutils,
intsets, ast, idents, algorithm, renderer, parser, os, strutils,
sequtils, msgs, modulegraphs, syntaxes, options, modulepaths, tables,
lineinfos

View file

@ -1670,7 +1670,7 @@ proc semProcAux(c: PContext, n: PNode, kind: TSymKind,
localError(c.config, n.info, "the overloaded " & s.name.s &
" operator has to be enabled with {.experimental: \"callOperator\".}")
if n.sons[bodyPos].kind != nkEmpty:
if n.sons[bodyPos].kind != nkEmpty and sfError notin s.flags:
# for DLL generation it is annoying to check for sfImportc!
if sfBorrow in s.flags:
localError(c.config, n.sons[bodyPos].info, errImplOfXNotAllowed % s.name.s)

View file

@ -112,9 +112,9 @@ proc registerAdditionalOps*(c: PCtx) =
registerCallback(c, "stdlib.math.mod", `mod Wrapper`)
when defined(nimcore):
wrap2s(getEnv, ospathsop)
wrap1s(existsEnv, ospathsop)
wrap2svoid(putEnv, ospathsop)
wrap2s(getEnv, osop)
wrap1s(existsEnv, osop)
wrap2svoid(putEnv, osop)
wrap1s(dirExists, osop)
wrap1s(fileExists, osop)
wrap2svoid(writeFile, systemop)