mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-30 01:44:37 +00:00
21 lines
312 B
Nim
21 lines
312 B
Nim
discard """
|
|
action: compile
|
|
"""
|
|
|
|
# bug #4671
|
|
{.experimental.}
|
|
{.this: self.}
|
|
type
|
|
SomeObj = object
|
|
f: int
|
|
|
|
proc f(num: int) =
|
|
discard
|
|
|
|
var intptr: ptr int
|
|
intptr.f() # compiles fine
|
|
|
|
proc doSomething(self: var SomeObj) =
|
|
var pint: ptr int
|
|
pint.f() # Error: expression '.(pint, "f")' cannot be called
|