Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/embed_tests/Events.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ public ClassWithEventHandler()
this.arr = new int[800];
}

// Reference LeakEvent to silence warning
protected virtual void OnLeakEvent(EventArgs e)
{
LeakEvent?.Invoke(this, e);
}

~ClassWithEventHandler()
{
Interlocked.Decrement(ref alive);
Expand Down
2 changes: 2 additions & 0 deletions src/runtime/PythonTypes/PyFloat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,5 +103,7 @@ public static PyFloat AsFloat(PyObject value)
public double ToDouble() => Runtime.PyFloat_AsDouble(obj);

public override TypeCode GetTypeCode() => TypeCode.Double;

public override int GetHashCode() => base.GetHashCode();
}
}
2 changes: 2 additions & 0 deletions src/runtime/PythonTypes/PyInt.cs
Original file line number Diff line number Diff line change
Expand Up @@ -232,5 +232,7 @@ public string ToString(string format, IFormatProvider formatProvider)
}

public override TypeCode GetTypeCode() => TypeCode.Int64;

public override int GetHashCode() => base.GetHashCode();
}
}
2 changes: 1 addition & 1 deletion src/runtime/Util/ReflectionPolyfills.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public static AssemblyBuilder DefineDynamicAssembly(this AppDomain _, AssemblyNa

public static Type CreateType(this TypeBuilder typeBuilder)
{
return typeBuilder.CreateTypeInfo();
return typeBuilder.CreateTypeInfo()!;
}

public static T GetCustomAttribute<T>(this Type type) where T: Attribute
Expand Down
Loading