* mini-<ARCH>.c (get_call_info): Call mini_type_get_underlying_type () before passing
a type to MONO_TYPE_IS_REFERENCE (), since the latter can't handle VAR/MVAR.
Fixes #620864.
* generics.cs: Add a test.
svn path=/trunk/mono/; revision=160206
+2010-07-11 Zoltan Varga <vargaz@gmail.com>
+
+ * mini-<ARCH>.c (get_call_info): Call mini_type_get_underlying_type () before passing
+ a type to MONO_TYPE_IS_REFERENCE (), since the latter can't handle VAR/MVAR.
+ Fixes #620864.
+
+ * generics.cs: Add a test.
+
2010-07-11 Rodrigo Kumpera <rkumpera@novell.com>
* mini.c (mono_jit_compile_method_inner): Don't bomb out if we don't
return 0;
}
+ class Pair<TKey, TValue> {
+ public static KeyValuePair<TKey, TValue> make_pair (TKey key, TValue value)
+ {
+ return new KeyValuePair<TKey, TValue> (key, value);
+ }
+
+ public delegate TRet Transform<TRet> (TKey key, TValue value);
+ }
+
+ public static int test_0_bug_620864 () {
+ var d = new Pair<string, Type>.Transform<KeyValuePair<string, Type>> (Pair<string, Type>.make_pair);
+
+ var p = d ("FOO", typeof (int));
+ if (p.Key != "FOO" || p.Value != typeof (int))
+ return 1;
+
+ return 0;
+ }
+
public static int test_0_partial_sharing () {
if (PartialShared1 (new List<string> (), 1) != typeof (string))
return 1;
* are sometimes made using calli without sig->hasthis set, like in the delegate
* invoke wrappers.
*/
- if (cinfo->vtype_retaddr && !is_pinvoke && (sig->hasthis || (sig->param_count > 0 && MONO_TYPE_IS_REFERENCE (sig->params [0])))) {
+ if (cinfo->vtype_retaddr && !is_pinvoke && (sig->hasthis || (sig->param_count > 0 && MONO_TYPE_IS_REFERENCE (mini_type_get_underlying_type (gsctx, sig->params [0]))))) {
if (sig->hasthis) {
add_general (&gr, &stack_size, cinfo->args + 0);
} else {
* are sometimes made using calli without sig->hasthis set, like in the delegate
* invoke wrappers.
*/
- if (cinfo->vtype_retaddr && !is_pinvoke && (sig->hasthis || (sig->param_count > 0 && MONO_TYPE_IS_REFERENCE (sig->params [0])))) {
+ if (cinfo->vtype_retaddr && !is_pinvoke && (sig->hasthis || (sig->param_count > 0 && MONO_TYPE_IS_REFERENCE (mini_type_get_underlying_type (gsctx, sig->params [0]))))) {
if (sig->hasthis) {
add_general (&gr, &stack_size, cinfo->args + 0, TRUE);
} else {
* are sometimes made using calli without sig->hasthis set, like in the delegate
* invoke wrappers.
*/
- if (cinfo->vtype_retaddr && !is_pinvoke && (sig->hasthis || (sig->param_count > 0 && MONO_TYPE_IS_REFERENCE (sig->params [0])))) {
+ if (cinfo->vtype_retaddr && !is_pinvoke && (sig->hasthis || (sig->param_count > 0 && MONO_TYPE_IS_REFERENCE (mini_type_get_underlying_type (gsctx, sig->params [0]))))) {
if (sig->hasthis) {
add_general (&gr, &stack_size, cinfo->args + 0, TRUE);
n ++;
* are sometimes made using calli without sig->hasthis set, like in the delegate
* invoke wrappers.
*/
- if (cinfo->vtype_retaddr && !is_pinvoke && (sig->hasthis || (sig->param_count > 0 && MONO_TYPE_IS_REFERENCE (sig->params [0])))) {
+ if (cinfo->vtype_retaddr && !is_pinvoke && (sig->hasthis || (sig->param_count > 0 && MONO_TYPE_IS_REFERENCE (mini_type_get_underlying_type (gsctx, sig->params [0]))))) {
if (sig->hasthis) {
add_general (&gr, &stack_size, cinfo->args + 0);
} else {