managed-commons / stab-language

Automatically exported from code.google.com/p/stab-language
Apache License 2.0
5 stars 3 forks source link

How to access create class Map.Entry #33

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
None of the following lines work:

//Map.Entry<String, String> entry;
//Map<String, String>.Entry entry;
//Map<String, String>.Entry<String, String> entry;

And the following code:

 public static void main(String[] args){

     Map.Entry entry;
}

returns the exception:

Exception in thread "main" java.lang.NullPointerException
        at org.objectweb.asm.MethodWriter.visitLocalVariable(Unknown Source)
        at stab.tools.bytecode.JvmCodeGenerator.accept(JvmCodeGenerator.stab:1103)
        at stab.tools.bytecode.JvmMethodBuilder.accept(JvmMethodBuilder.stab:264)
        at stab.tools.bytecode.JvmTypeBuilder.createType(JvmTypeBuilder.stab:235)
        at stab.tools.compiler.Compiler.doCompile(Compiler.stab:264)
        at stab.tools.compiler.Compiler.compileFromFiles(Compiler.stab:168)
        at stab.tools.compiler.Application.run(Application.stab:128)
        at stab.tools.compiler.Application.main(Application.stab:30)

Original issue reported on code.google.com by ice.ta...@gmail.com on 5 Aug 2010 at 10:56

GoogleCodeExporter commented 9 years ago
It was a bug. The correct form is:

Map.Entry<String, String> entry;

Original comment by stab.hac...@gmail.com on 22 Sep 2010 at 9:01