We observed that in come code produced by Groovy compiler there are missing line number attributes. Consider example:
~~~~~~~~~~~~~~~~~~
class DependencyManager {
Map artifactDescriptors = []
}
~~~~~~~~~~~~~~~~~~
In generated .class-file LineNumbertable attribute for initial code of DependencyManager class is absent. In same time if we use class initializer:
~~~~~~~~~~~~~~~~~~
class DependencyManager {
{
Map artifactDescriptors = []
}
}
~~~~~~~~~~~~~~~~~~
we will see correct line number table:
LineNumberTable:
line 2: 108
line 3: 108
This annoying discrepancy complicates debugger's work.