summary refs log blame commit diff stats
path: root/tests/caas/completion_dot_syntax_main.nim
blob: 0be8c7f4fb1e9f7853d71ae52e06343085ae84a2 (plain) (tree)























                                                                            
import strutils

# Verifies if the --suggestion switch differentiates types for dot notation.

type
  TDollar = distinct int
  TEuro = distinct int

proc echoRemainingDollars(amount: TDollar) =
  echo "You have $1 dollars" % [$int(amount)]

proc echoRemainingEuros(amount: TEuro) =
  echo "You have $1 euros" % [$int(amount)]

proc echoRemainingBugs() =
  echo "You still have bugs"

proc main =
  var
    d: TDollar
    e: TEuro
  d = TDollar(23)
  e = TEuro(32)
  d.echoRemainingDollars()