Permalink
Browse files

fixed List and Null<T> for first, last, pop

git-svn-id: http://haxe.googlecode.com/svn/trunk@4480 f16182fa-f095-11de-8f43-4547254af6c6
  • Loading branch information...
1 parent a044c0e commit 970177c96aeaa18890d2b0d631e56b600001eba0 ncannasse committed Apr 20, 2012
Showing with 6 additions and 6 deletions.
  1. +3 −3 std/List.hx
  2. +3 −3 std/php/_std/List.hx
View
@@ -77,15 +77,15 @@ class List<T> {
Returns the first element of the list, or null
if the list is empty.
**/
- public function first() : T {
+ public function first() : Null<T> {
return if( h == null ) null else h[0];
}
/**
Returns the last element of the list, or null
if the list is empty.
**/
- public function last() : T {
+ public function last() : Null<T> {
return if( q == null ) null else q[0];
}
@@ -95,7 +95,7 @@ class List<T> {
returns it or simply returns null if the
list is empty.
**/
- public function pop() : T {
+ public function pop() : Null<T> {
if( h == null )
return null;
var x = h[0];
@@ -52,15 +52,15 @@
length++;
}
- public function first() : T {
+ public function first() : Null<T> {
return if( h == null ) null else h[0];
}
- public function last() : T {
+ public function last() : Null<T> {
return if( q == null ) null else q[0];
}
- public function pop() : T {
+ public function pop() : Null<T> {
if( h == null )
return null;
var x = h[0];

0 comments on commit 970177c

Please sign in to comment.