Changeset 5358


Ignore:
Timestamp:
06/19/09 07:46:52 (3 years ago)
Author:
azawawi
Message:

[Perl 6] Added some typing to Point P6 class

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Padre-Plugin-Perl6/lib/Padre/Plugin/Perl6/share/templates/p6_class.p6

    r5357 r5358  
    77    # attributes;  
    88    # note that variable initialization is not automatic in Perl 6 
    9     has $.x = 0; 
    10     has $.y = 0; 
     9    has Num $.x = 0; 
     10    has Num $.y = 0; 
    1111 
    1212    # a method to move to a new location 
    13     method move($new_x, $new_y) { 
     13    method move(Num $new_x, Num $new_y) { 
    1414        $.x = $new_x; 
    1515        $.y = $new_y; 
Note: See TracChangeset for help on using the changeset viewer.