qdrzwd / dexmaker

Automatically exported from code.google.com/p/dexmaker
0 stars 0 forks source link

Code.returnValue(Local) is too strict #25

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Declare a method with return type A
2. In this method's body call Code.returnValue(local) where local has class 
Local<B> and where B extends A
3. Generate this code with DexMaker.generate()

What is the expected output? What do you see instead?
java.lang.IllegalArgumentException: declared A but returned B

What version of the product are you using? On what operating system?
1.0

Please provide any additional information below.
This a common and valid scenario but it's impossible to generate with 
dexmaker-1.0. I think this check could be disabled temporarily.

Original issue reported on code.google.com by bonifa...@gmail.com on 1 Jun 2013 at 5:18