Fix issues with map type#242
Conversation
|
Sorry for delay, but would it be possible to get a simplified version of this test program in as an actual test for the package? |
|
I made this patch to test my tests. To apply it "cd" to the root level of your local repo and run this command: "patch -p1 < NSError-tests.patch". I had to comment out the Dictionary and Array tests because they cause the test system to fail. This prevents the NSError tests from running. With all my pull requests applied all the tests run successfully. Here is the output on my machine: |
|
Why not make this patch part of this PR? |
|
Done. |
In the function type_convertion.go:convertToGoValue() it makes a call to reflect.ValueOf() for the reflect.Map case. This should not be done because the value that ToGoMap() returns is already of type reflect.Value. Also it makes type assertions fail for map types.
This program was used to test these two patches:
Before these patches this program would panic at the call to myError.UserInfo(). With the patches applied this program works correctly.