From 01f316cf1f34fc23cd2a7df7ee84fe85215e70d6 Mon Sep 17 00:00:00 2001 From: Timothee Cour Date: Mon, 3 May 2021 14:06:15 -0700 Subject: [PATCH] mention -d:nimLegacyConvEnumEnum in error msg (#17928) --- compiler/types.nim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler/types.nim b/compiler/types.nim index b57e464443..d9997feba3 100644 --- a/compiler/types.nim +++ b/compiler/types.nim @@ -1525,6 +1525,8 @@ proc typeMismatch*(conf: ConfigRef; info: TLineInfo, formal, actual: PType, n: P msg.add "\n.tag effect is 'any tag allowed'" of efLockLevelsDiffer: msg.add "\nlock levels differ" + if formal.kind == tyEnum and actual.kind == tyEnum: + msg.add "\nmaybe use `-d:nimLegacyConvEnumEnum` for a transition period" localError(conf, info, msg) proc isTupleRecursive(t: PType, cycleDetector: var IntSet): bool =