summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorZahary Karadjov <zahary@gmail.com>2016-08-04 04:36:04 +0300
committerZahary Karadjov <zahary@gmail.com>2017-03-24 16:58:15 +0200
commita90c4c4d7e074de2390d4c659533618057534f7b (patch)
tree2a38c68f0e0be4bac0d45f4d191e287dcfaf99fe /compiler
parent19918ad96f7ba40e4656e5881290cfc4cfd20424 (diff)
downloadNim-a90c4c4d7e074de2390d4c659533618057534f7b.tar.gz
kill the reportConceptFailures options as it will be replaced by the .explain. pragma
Diffstat (limited to 'compiler')
-rw-r--r--compiler/commands.nim2
-rw-r--r--compiler/options.nim1
-rw-r--r--compiler/semcall.nim7
-rw-r--r--compiler/semexprs.nim5
4 files changed, 3 insertions, 12 deletions
diff --git a/compiler/commands.nim b/compiler/commands.nim
index 1b42a191e..22e4b5a2c 100644
--- a/compiler/commands.nim
+++ b/compiler/commands.nim
@@ -478,8 +478,6 @@ proc processSwitch(switch, arg: string, pass: TCmdLinePass, info: TLineInfo;
   of "linedir": processOnOffSwitch({optLineDir}, arg, pass, info)
   of "assertions", "a": processOnOffSwitch({optAssert}, arg, pass, info)
   of "deadcodeelim": processOnOffSwitchG({optDeadCodeElim}, arg, pass, info)
-  of "reportconceptfailures":
-    processOnOffSwitchG({optReportConceptFailures}, arg, pass, info)
   of "threads":
     processOnOffSwitchG({optThreads}, arg, pass, info)
     #if optThreads in gGlobalOptions: incl(gNotes, warnGcUnsafe)
diff --git a/compiler/options.nim b/compiler/options.nim
index 6372cddac..063dff826 100644
--- a/compiler/options.nim
+++ b/compiler/options.nim
@@ -41,7 +41,6 @@ type                          # please make sure we have under 32 options
   TGlobalOption* = enum       # **keep binary compatible**
     gloptNone, optForceFullMake, optDeadCodeElim,
     optListCmd, optCompileOnly, optNoLinking,
-    optReportConceptFailures, # report 'compiles' or 'concept' matching failures
     optCDebug,                # turn on debugging information
     optGenDynLib,             # generate a dynamic library
     optGenStaticLib,          # generate a static library
diff --git a/compiler/semcall.nim b/compiler/semcall.nim
index ffa940291..b440d1e75 100644
--- a/compiler/semcall.nim
+++ b/compiler/semcall.nim
@@ -118,7 +118,7 @@ proc notFoundError*(c: PContext, n: PNode, errors: CandidateErrors) =
   # Gives a detailed error message; this is separated from semOverloadedCall,
   # as semOverlodedCall is already pretty slow (and we need this information
   # only in case of an error).
-  if c.compilesContextId > 0 and optReportConceptFailures notin gGlobalOptions:
+  if c.compilesContextId > 0:
     # fail fast:
     globalError(n.info, errTypeMismatch, "")
   if errors.isNil or errors.len == 0:
@@ -163,10 +163,7 @@ proc notFoundError*(c: PContext, n: PNode, errors: CandidateErrors) =
       add(candidates, "for a 'var' type a variable needs to be passed, but '" & renderTree(n[mut]) & "' is immutable\n")
   if candidates != "":
     add(result, "\n" & msgKindToString(errButExpected) & "\n" & candidates)
-  if c.compilesContextId > 0 and optReportConceptFailures in gGlobalOptions:
-    globalError(n.info, errGenerated, result)
-  else:
-    localError(n.info, errGenerated, result)
+  localError(n.info, errGenerated, result)
 
 proc bracketNotFoundError(c: PContext; n: PNode) =
   var errors: CandidateErrors = @[]
diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim
index 74c4ae5d5..475f496f1 100644
--- a/compiler/semexprs.nim
+++ b/compiler/semexprs.nim
@@ -1755,8 +1755,7 @@ proc tryExpr(c: PContext, n: PNode, flags: TExprFlags = {}): PNode =
     result = semExpr(c, n, flags)
     if msgs.gErrorCounter != oldErrorCount: result = nil
   except ERecoverableError:
-    if optReportConceptFailures in gGlobalOptions:
-      err = getCurrentExceptionMsg()
+    discard
   # undo symbol table changes (as far as it's possible):
   c.compilesContextId = oldCompilesId
   c.generics = oldGenerics
@@ -1770,8 +1769,6 @@ proc tryExpr(c: PContext, n: PNode, flags: TExprFlags = {}): PNode =
   errorOutputs = oldErrorOutputs
   msgs.gErrorCounter = oldErrorCount
   msgs.gErrorMax = oldErrorMax
-  if optReportConceptFailures in gGlobalOptions and not err.isNil:
-    localError(n.info, err)
 
 proc semCompiles(c: PContext, n: PNode, flags: TExprFlags): PNode =
   # we replace this node by a 'true' or 'false' node: