diff java/src/java/lang/Float.d @ 21:9b96950f2c3c

the 'java' tree compiles on both D1-Tango and D2-Phobos
author Frank Benoit <benoit@tionex.de>
date Thu, 19 Mar 2009 20:38:55 +0100
parents 712ffca654f3
children
line wrap: on
line diff
--- a/java/src/java/lang/Float.d	Wed Mar 18 12:10:17 2009 +0100
+++ b/java/src/java/lang/Float.d	Thu Mar 19 20:38:55 2009 +0100
@@ -27,11 +27,16 @@
         return null;
     }
     public static float parseFloat( String s ){
-        try{
-            return tango.text.convert.Float.toFloat( s );
-        }
-        catch( IllegalArgumentException e ){
-            throw new NumberFormatException( e );
+        version(Tango){
+            try{
+                return tango.text.convert.Float.toFloat( s );
+            }
+            catch( IllegalArgumentException e ){
+                throw new NumberFormatException( e );
+            }
+        } else { // Phobos
+            implMissing( __FILE__, __LINE__ );
+            return 0.0f;
         }
     }