# Dynamic Token Test

typedef int number;

type any;

fun test ( any val ) : any
{
  fun plus1 ( number val ) : number
  {
    return val + 1;
  }
  if Type(val) == "string"
  {
    if length(val) == 0
    {
      return "";
    }
    let val = val + val;
    return val;
  }
  else
  {
    return plus1 ( val );
  }
}

fun plus2 ( int v1, int v2 ) : int
{
  while v1 < v2
  {
    let v1 = v1 + 2;
  }
  return v1;
}

# main

fun main () : void
{
  return plus2 ( 2, 20 );
}
