Skip to content

Indexers in Explicit Interface Implementation declarations are throwing translation exceptions and prevent file translation #43

@62mkv

Description

@62mkv

this method in C# source prevents class from being translated to Java:

string IParameterCollection.this[string name]
{
	get
	{
		IParameter parameter = this[name, 0];
		if (parameter != null)
		{
			return parameter.Value;
		}
		return null;
	}
}

this throws an Exception:

Cannot process file: C:\Users\mypath\SomeCollection.cs                                       exception: 
Antlr.Runtime.Tree.RewriteEmptyStreamException: rule method_body                                                                                                             

at Antlr.Runtime.Tree.RewriteRuleElementStream.NextTree()                                                                                                                       

at Antlr.Runtime.Tree.RewriteRuleSubtreeStream.FetchObject(ProcessHandler ph)                                                                                                         

at Antlr.Runtime.Tree.RewriteRuleSubtreeStream.NextTree()                                                                                                                              

at Twiglet.CS2J.Translator.Transform.NetMaker.class_member_declaration()                                                                                                               

at Twiglet.CS2J.Translator.Transform.NetMaker.class_member_declarations()                                                                                                              

at Twiglet.CS2J.Translator.Transform.NetMaker.class_body()                                                                                                                             

at Twiglet.CS2J.Translator.Transform.NetMaker.class_declaration()                                                                                                                      

at Twiglet.CS2J.Translator.Transform.NetMaker.type_declaration()                                                                                                                       

at Twiglet.CS2J.Translator.Transform.NetMaker.compilation_unit()                                                                                                                       

at Twiglet.CS2J.Translator.CS2J.translateFile(String fullName)                                                                                                                         

at Twiglet.CS2J.Translator.CS2J.doFile(String root, String ext, FileProcessor processFile, IList`1 excludes) 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions