Skip to content

Commit 051c11f

Browse files
committed
remove overload of distinctBase for variables (requested by @Araq)
1 parent 4e5ec50 commit 051c11f

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

lib/pure/sugar.nim

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -237,19 +237,3 @@ macro distinctBase*(T: typedesc): untyped =
237237
while typeSym.typeKind == ntyDistinct:
238238
typeSym = getTypeImpl(typeSym)[0]
239239
typeSym.replaceNodes
240-
241-
# using `auto` return pending https://github.com/nim-lang/Nim/issues/8551
242-
func distinctBase*[T](a: T): auto {.inline.} =
243-
## converts a distinct variable to it's original type
244-
runnableExamples:
245-
type T = distinct int
246-
var a: T = T(1)
247-
let b = a.distinctBase
248-
doAssert b is int
249-
doAssert b == 1
250-
distinctBase(T)(a)
251-
252-
when isMainModule:
253-
# pending https://github.com/nim-lang/Nim/issues/7280
254-
type T=distinct int
255-
discard distinctBase(T(0))

0 commit comments

Comments
 (0)