parent
21fc8b4d4d
commit
5f7a6aff06
3 changed files with 23 additions and 3 deletions
|
|
@ -6,6 +6,7 @@ output: '''
|
|||
a
|
||||
hi
|
||||
Hello, World!
|
||||
(e: 42)
|
||||
'''
|
||||
"""
|
||||
|
||||
|
|
@ -220,3 +221,17 @@ block t5235:
|
|||
|
||||
outer:
|
||||
test("Hello, World!")
|
||||
|
||||
|
||||
# bug #11941
|
||||
type X = object
|
||||
e: int
|
||||
|
||||
proc works(T: type X, v: auto): T = T(e: v)
|
||||
template fails(T: type X, v: auto): T = T(e: v)
|
||||
|
||||
var
|
||||
w = X.works(42)
|
||||
x = X.fails(42)
|
||||
|
||||
echo x
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue