diff options
author | Timothee Cour <timothee.cour2@gmail.com> | 2021-05-03 14:06:15 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-03 23:06:15 +0200 |
commit | 01f316cf1f34fc23cd2a7df7ee84fe85215e70d6 (patch) | |
tree | 674023ae81b4327062ea19def0bcd83bebb26037 | |
parent | 8ce69d584186371eccdb56e1b96616a3ddca223b (diff) | |
download | Nim-01f316cf1f34fc23cd2a7df7ee84fe85215e70d6.tar.gz |
mention -d:nimLegacyConvEnumEnum in error msg (#17928)
-rw-r--r-- | compiler/types.nim | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/types.nim b/compiler/types.nim index b57e46444..d9997feba 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 = |