mention -d:nimLegacyConvEnumEnum in error msg (#17928)

This commit is contained in:
Timothee Cour 2021-05-03 14:06:15 -07:00 • committed by GitHub
commit 01f316cf1f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 =