Fixes #11045. Assigning a proc to const and invoking. (#11076)

This commit is contained in:
Aditya Siram
2019-05-04 15:57:16 -05:00
committed by Andreas Rumpf
parent 45759b5e90
commit cc2be5e4c6
2 changed files with 26 additions and 4 deletions

View File

@@ -0,0 +1,18 @@
discard """
output: '''
100
100
'''
"""
proc f():int {.compileTime.} = 100
const F = f
echo F()
const G = proc ():int =
let x = f
let y = x
y()
echo G()