Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report for Bug 17407 on
Developer Community or GitHub if you have new
information to add and do not yet see a matching new report.
If the latest results still closely match this report, you can use the
In special cases on GitHub you might also want the comments:
GitHub Markdown with public comments
Created attachment 5907 [details]
## Steps to reproduce
Attempt to build the solution in the attached test case.
The compilation fails because FileOutputStream is not a valid input to the `BufferedOutputStream(Stream)` constructor.
> error CS1502: The best overloaded method match for `Java.IO.BufferedOutputStream.BufferedOutputStream(System.IO.Stream)' has some invalid arguments
> error CS1503: Argument `#1' cannot convert `Java.IO.FileOutputStream' expression to type `System.IO.Stream'
`BufferedOutputStream(System.IO.Stream)` will happily take a System.IO.FileStream as an argument to the constructor, so the following compiles without error:
## Possible enhancement
- Perhaps `FileOutputStream` could be made convertible to `System.IO.Stream`?
- Or maybe another set of constructors could be added to `BufferedOutputStream` to allow passing in `Java.IO.OutputStream` arguments?
Rephrased: generator should overload constructors and methods which take a *Stream Java type (which is currently bound as System.IO.Stream) and generate _two_ constructors/methods: one taking the current System.IO.Stream type, and one to take the original Java type.
Can duplicate this error using the provided sample.