We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4e5ec50 commit 051c11fCopy full SHA for 051c11f
lib/pure/sugar.nim
@@ -237,19 +237,3 @@ macro distinctBase*(T: typedesc): untyped =
237
while typeSym.typeKind == ntyDistinct:
238
typeSym = getTypeImpl(typeSym)[0]
239
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