Repository navigation
IronJava v2.1.0 Release Notes
🎉 New Features
Nested Types Support
- Added full support for nested type declarations (inner classes, interfaces, enums, and annotations)
- All type declaration nodes (ClassDeclaration, InterfaceDeclaration, EnumDeclaration, AnnotationDeclaration)
now include a NestedTypes property - The Body property now correctly includes both members and nested types
- Enables proper AST representation of Java code with nested class structures
🐛 Bug Fixes
Fixed Constructor Parameter Issues
- Resolved compilation errors in AstTransformer.cs where constructor calls were missing the nestedTypes
parameter - Fixed incorrect parameter ordering in type declaration constructors
- Updated AstBuilder.cs to include all required parameters when creating type declaration nodes
JSON Serialization Improvements
- Added serialization support for nestedTypes in all type declarations
- Implemented backward-compatible deserialization that handles JSON without nestedTypes or isRecord
properties - Fixed KeyNotFoundException errors when deserializing older JSON formats
🔧 Technical Changes
- Updated all type declaration constructors to include the nestedTypes parameter
- Modified AST transformation logic to preserve nested types during transformations
- Enhanced JSON serialization/deserialization to handle the new property gracefully
- Updated test files to reflect the new constructor signatures
📦 Breaking Changes
None - This release maintains backward compatibility. Existing code will continue to work, with empty nested
type lists provided by default where needed.
🚀 Migration Guide
If you're creating type declaration nodes manually, update your constructor calls to include the nestedTypes
parameter:
// Before
new ClassDeclaration(location, name, modifiers, annotations,
typeParameters, superClass, interfaces, members, javaDoc, isRecord);
// After
new ClassDeclaration(location, name, modifiers, annotations,
typeParameters, superClass, interfaces, members, nestedTypes, javaDoc, isRecord);
For most users consuming the parsed AST, no changes are required.