java.lang.InstantiationError when factory construction is combined with generics

The following code compiles and should be fine, but it throws a java InstantiationError, when the class needsStuff is instantiated.

import android.app
import android.content
import android.os
import android.util
import android.view
import android.widget

public protocol Stuff{
    func somefunc(_ x: String)->String
}

class concretestuff: Stuff{
   public func somefunc(_ x: String) -> String {
		return x+x
	}
	init(){}
}

public protocol facp{
    init()
	func makestuff()->Stuff
}

class concretefac: facp{
    required init(){}
	public func makestuff() -> Stuff {
		return concretestuff()
	}
}

class needsStuff<F: facp>{
	private var factory: F
	init(){
		factory = F()
	}
}

public class MainActivity: Activity {

	public override func onCreate(_ savedInstanceState: Bundle!) {
		super.onCreate(savedInstanceState)
		ContentView = R.layout.main
	}
	let t = needsStuff<concretefac>()
}

This can be circumvented by getting rid of the generic parameter in needsStuff (essentially making the generic parameter a constructor parameter)

Version info:
Microsoft Visual Studio 2015 Shell (Integrated)
Version 14.0.23107.0 D14REL
Microsoft .NET Framework
Version 4.6.00081

Installed Version: IDE Standard

RemObjects Elements 9.0.97.2071
RemObjects Elements (Oxygene, C# and Silver) for .NET, Cocoa and Java.
Copyright 2003-2016 RemObjects Software, LLC. All rights reserved.
http://www.remobjects.com/elements

RemObjects Elements leverages the LLVM compiler backend:
Copyright © 2003-2016 University of Illinois at Urbana-Champaign. All rights reserved.
http://llvm.org

RemObjects Everwood 4.7.79.695
RemObjects Everwood
Copyright RemObjects Software, LLC 2002-2016. All Rights Reserved.
http://www.remobjects.com/everwood

Thanks, logged as bugs://77299

Unfortunately, due to the nature of java & cocoa this can’t really work. Specifically the F() thing. You’d need to pass a block to be able to call constructors. (the issue here is that java eliminates the generics, so at this point it doesn’t really know what to do here). I’ll see what I can do error wise though.

I get, that this doesn’t work on java, when
mapping protocols to interfaces, since java doesn’t allow to specify constructors in interfaces (similar things might hold for cocoa), but I doubt, that it can’t be made working. The runtime should only be a problem, when trying to export such a construction (or when doing runtime introspection), but otherwise this shouldn’t be much of a problem, should it?