ICredentialsByHost credentials;
string pickupDirectoryLocation;
SmtpDeliveryMethod deliveryMethod;
+ SmtpDeliveryFormat deliveryFormat;
bool enableSsl;
#if SECURITY_DEP
X509CertificateCollection clientCertificates;
port = value;
}
}
-
+
+ public SmtpDeliveryFormat DeliveryFormat {
+ get { return deliveryFormat; }
+ set {
+ CheckState ();
+ deliveryFormat = value;
+ }
+ }
+
[MonoTODO]
public ServicePoint ServicePoint {
get { throw new NotImplementedException (); }
return IsBetterConversionTarget (rc, p, q);
}
+ var p_orig = p;
if (p.IsNullableType) {
p = Nullable.NullableInfo.GetUnderlyingType (p);
if (!BuiltinTypeSpec.IsPrimitiveTypeOrDecimal (p))
- return 0;
+ return BetterTypeConversionImplicitConversion (rc, p_orig, q);
//
// Spec expects implicit conversion check between p and q, q and p
return 2;
}
+ var q_orig = q;
if (q.IsNullableType) {
q = Nullable.NullableInfo.GetUnderlyingType (q);
if (!BuiltinTypeSpec.IsPrimitiveTypeOrDecimal (q))
- return 0;
+ return BetterTypeConversionImplicitConversion (rc, p_orig, q_orig);
if (q == p)
return 1;
break;
}
+ return BetterTypeConversionImplicitConversion (ec, p, q);
+ }
+
+ static int BetterTypeConversionImplicitConversion (ResolveContext rc, TypeSpec p, TypeSpec q)
+ {
// TODO: this is expensive
Expression p_tmp = new EmptyExpression (p);
Expression q_tmp = new EmptyExpression (q);
- bool p_to_q = Convert.ImplicitConversionExists (ec, p_tmp, q);
- bool q_to_p = Convert.ImplicitConversionExists (ec, q_tmp, p);
+ bool p_to_q = Convert.ImplicitConversionExists (rc, p_tmp, q);
+ bool q_to_p = Convert.ImplicitConversionExists (rc, q_tmp, p);
if (p_to_q && !q_to_p)
return 1;
--- /dev/null
+using System;
+
+public struct nint
+{
+ public static implicit operator nint (int v)
+ {
+ return 0;
+ }
+}
+
+public class MainClass
+{
+ static void Test (string key, int? value)
+ {
+ }
+
+ static void Test (string key, nint? value)
+ {
+ throw new ApplicationException ();
+ }
+
+ public static void Main ()
+ {
+ Test (null, int.MinValue);
+ }
+}
</method>
</type>
</test>
+ <test name="gtest-637.cs">
+ <type name="nint">
+ <method name="nint op_Implicit(Int32)" attrs="2198">
+ <size>15</size>
+ </method>
+ </type>
+ <type name="MainClass">
+ <method name="Void Test(System.String, System.Nullable`1[System.Int32])" attrs="145">
+ <size>2</size>
+ </method>
+ <method name="Void Test(System.String, System.Nullable`1[nint])" attrs="145">
+ <size>7</size>
+ </method>
+ <method name="Void Main()" attrs="150">
+ <size>18</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
<test name="gtest-anontype-01.cs">
<type name="Test">
<method name="Int32 Main()" attrs="150">
mono_coop_mutex_unlock (thread->synch_cs);
}
+static inline gboolean
+is_appdomainunloaded_exception (MonoClass *klass)
+{
+ return klass == mono_class_get_appdomain_unloaded_exception_class ();
+}
+
+static inline gboolean
+is_threadabort_exception (MonoClass *klass)
+{
+ return klass == mono_defaults.threadabortexception_class;
+}
+
/*
* NOTE: this function can be called also for threads different from the current one:
* make sure no code called from it will ever assume it is run on the thread that is
if (!mono_error_ok (&error)) {
MonoException *ex = mono_error_convert_to_exception (&error);
- if (ex) {
+
+ g_assert (ex != NULL);
+ MonoClass *klass = mono_object_get_class (&ex->object);
+ if ((mono_runtime_unhandled_exception_policy_get () != MONO_UNHANDLED_POLICY_LEGACY) &&
+ !is_threadabort_exception (klass)) {
mono_unhandled_exception (&ex->object);
mono_invoke_unhandled_exception_hook (&ex->object);
g_assert_not_reached ();
}
void
-mono_thread_exit ()
+mono_thread_exit (void)
{
MonoInternalThread *thread = mono_thread_internal_current ();
mono_thread_interruption_checkpoint ();
}
-static inline gboolean
-is_appdomainunloaded_exception (MonoClass *klass)
-{
- return klass == mono_class_get_appdomain_unloaded_exception_class ();
-}
-
-static inline gboolean
-is_threadabort_exception (MonoClass *klass)
-{
- return klass == mono_defaults.threadabortexception_class;
-}
-
void
mono_thread_internal_unhandled_exception (MonoObject* exc)
{
mono_os_mutex_init_recursive (&mini_arch_mutex);
if (mini_get_debug_options ()->soft_breakpoints) {
- breakpoint_tramp = mini_get_breakpoint_trampoline ();
+ if (!mono_aot_only)
+ breakpoint_tramp = mini_get_breakpoint_trampoline ();
} else {
ss_trigger_page = mono_valloc (NULL, mono_pagesize (), MONO_MMAP_READ|MONO_MMAP_32BIT);
bp_trigger_page = mono_valloc (NULL, mono_pagesize (), MONO_MMAP_READ|MONO_MMAP_32BIT);
if (ji->from_aot) {
SeqPointInfo *info = mono_arch_get_seq_point_info (mono_domain_get (), ji->code_start);
+ if (!breakpoint_tramp)
+ breakpoint_tramp = mini_get_breakpoint_trampoline ();
+
g_assert (native_offset % 4 == 0);
g_assert (info->bp_addrs [native_offset / 4] == 0);
info->bp_addrs [native_offset / 4] = opt->soft_breakpoints ? breakpoint_tramp : bp_trigger_page;
guint32 native_offset = ip - (guint8*)ji->code_start;
SeqPointInfo *info = mono_arch_get_seq_point_info (mono_domain_get (), ji->code_start);
+ if (!breakpoint_tramp)
+ breakpoint_tramp = mini_get_breakpoint_trampoline ();
+
g_assert (native_offset % 4 == 0);
g_assert (info->bp_addrs [native_offset / 4] == (opt->soft_breakpoints ? breakpoint_tramp : bp_trigger_page));
info->bp_addrs [native_offset / 4] = 0;