This commit is contained in:
Andreas Rumpf 2016-04-29 20:56:30 +02:00
commit c870e831c8
2 changed files with 33 additions and 3 deletions

View file

@ -0,0 +1,25 @@
# bug #4124
import sequtils
type
Foo = distinct string
var
foo: Foo
type
Alias = (type(foo))
var
a: Alias
a = foo
when true:
var xs = @[1,2,3]
proc asFoo(i: string): Foo =
Foo(i)
var xx = xs.mapIt(asFoo($(it + 5)))