* fixes #10838
* reject func in types instead
* trigger tests
This commit is contained in:
cooldome
2019-03-18 10:04:01 +00:00
committed by Andreas Rumpf
parent afeca3d9fe
commit c19cd14fc9
2 changed files with 16 additions and 0 deletions

14
tests/proc/tfunc_type.nim Normal file
View File

@@ -0,0 +1,14 @@
discard """
errmsg: "func keyword is not allowed in type descriptions, use proc with {.noSideEffect.} pragma instead"
"""
type
MyObject = object
fn: func(a: int): int
proc myproc(a: int): int =
echo "bla"
result = a
var x = MyObject(fn: myproc)