ajwang / groovypptest

Automatically exported from code.google.com/p/groovypptest
0 stars 0 forks source link

Problems using Java Standard classes (date) with Mode Typed or Mixed #311

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
@Typed(TypePolicy.MIXED)
   def mixedMethod () {

        Date d = new Date()  // This produces a compiler error

       ["HAT","CAT","MOUSE"].each {
           it.toLowerCase()
       }

   }

@Typed(TypePolicy.DYNAMIC)
   def dynamicMethod () {

       Date d = new Date()    // but this is ok
       ["HAT","CAT","MOUSE"].each {
           it.toLowerCase()
       }

   }

The error produced during compiling is 

Groovy:BUG!#getTypeClass for java.util.Date is called before the type class is 
set

This only happens in Mixed or Static modes, and it happens for all standard 
java classes

groovypp version is 0.2.26
groovy 1.7.5
jdk 1.6

Original issue reported on code.google.com by kusan.at...@gmail.com on 4 Nov 2010 at 6:23

GoogleCodeExporter commented 8 years ago
This issue is not reproducible any more. The code examples provided work just 
fine now.

Can you please verify using the current Groovy++?

Original comment by roshanda...@gmail.com on 8 Jan 2011 at 1:34

GoogleCodeExporter commented 8 years ago
Issue doesn't exist anymore. Verified using 0.4.150. 

See: http://gppconsole.appspot.com/script/16002

Original comment by roshanda...@gmail.com on 6 Feb 2011 at 3:12