mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-29 17:34:43 +00:00
1) There are too many suggestions for the given prefix. 2) The suggestions don't take into account the preceeding type. 3) trackDirty only works on caas mode.
26 lines
505 B
Nim
26 lines
505 B
Nim
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()
|
|
e.echoRemai
|