Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

in pike:

    #pragma strict_types
    void main()
    {
      int(1..10) i = 3;
      i += 7;
      i += 1;
      write("%O\n", i);
      i = 11;
    }
output:

    typetest.pike:6: Warning: An expression of type int cannot be assigned to a variable of type int(1..10).
    typetest.pike:8:Bad type in assignment.
    typetest.pike:8:Expected: int(1..10).
    typetest.pike:8:Got     : int(11..11).
    Pike: Failed to compile script.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: