This commit is contained in:
Andreas Rumpf 2020-04-19 10:01:04 +02:00 • committed by GitHub
commit 9874981e75
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 7 deletions

View file

@ -1276,7 +1276,7 @@ proc typeRel(c: var TCandidate, f, aOrig: PType,
of tyNil: result = allowsNilDeprecated(c, f)
else: discard
of tyOrdinal:
if isOrdinalType(a):
if isOrdinalType(a, allowEnumWithHoles = optNimV1Emulation in c.c.config.globalOptions):
var x = if a.kind == tyOrdinal: a[0] else: a
if f[0].kind == tyNone:
result = isGeneric