This commit is contained in:
Andreas Rumpf 2019-08-29 00:35:05 +02:00 • committed by GitHub
commit 5f7a6aff06
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 23 additions and 3 deletions

View file

@ -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