summary refs log tree commit diff stats
path: root/tests/untestable
ModeNameSize
d---------gdb237log stats plain
d---------network70log stats plain
-rw-r--r--readme.markdown408log stats plain blame
-rw-r--r--thttpclient_ssl.nim7951log stats plain blame
-rw-r--r--thttpclient_ssl_disabled.nim1182log stats plain blame
-rw-r--r--thttpclient_ssl_env_var.nim2429log stats plain blame
-rw-r--r--tpostgres.nim11590log stats plain blame
-rw-r--r--tssl.nim1134log stats plain blame
ht .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
discard """
  output: '''x as ParameterizedType[T]
x as ParameterizedType[T]
x as ParameterizedType[T]
x as ParameterizedType
x as ParameterizedType
x as CustomTypeClass'''
"""

type ParameterizedType[T] = object

type CustomTypeClass = concept
  true

# 3 competing procs
proc a[T](x: ParameterizedType[T]) =
  echo "x as ParameterizedType[T]"

proc a(x: ParameterizedType) =
  echo "x as ParameterizedType"

proc a(x: CustomTypeClass) =
  echo "x as CustomTypeClass"

# the same procs in different order
proc b(x: ParameterizedType) =
  echo "x as ParameterizedType"

proc b(x: CustomTypeClass) =
  echo "x as CustomTypeClass"

proc b[T](x: ParameterizedType[T]) =
  echo "x as ParameterizedType[T]"

# and yet another order
proc c(x: CustomTypeClass) =
  echo "x as CustomTypeClass"

proc c(x: ParameterizedType) =
  echo "x as ParameterizedType"

proc c[T](x: ParameterizedType[T]) =
  echo "x as ParameterizedType[T]"

# remove the most specific one
proc d(x: ParameterizedType) =
  echo "x as ParameterizedType"

proc d(x: CustomTypeClass) =
  echo "x as CustomTypeClass"

# then shuffle the order again
proc e(x: CustomTypeClass) =
  echo "x as CustomTypeClass"

proc e(x: ParameterizedType) =
  echo "x as ParameterizedType"

# the least specific one is a match
proc f(x: CustomTypeClass) =
  echo "x as CustomTypeClass"

a(ParameterizedType[int]())
b(ParameterizedType[int]())
c(ParameterizedType[int]())
d(ParameterizedType[int]())
e(ParameterizedType[int]())
f(ParameterizedType[int]())