From 59233cc9969df3772e5574e4af4c503183b0a5d2 Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Tue, 19 Nov 2019 13:53:00 -0800 Subject: [PATCH] Rando fix --- IDE/mintest/minlib/src/System/Attribute.bf | 6 ++++++ IDE/mintest/minlib/src/System/Object.bf | 9 +++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/IDE/mintest/minlib/src/System/Attribute.bf b/IDE/mintest/minlib/src/System/Attribute.bf index f53a43e9..0af36363 100644 --- a/IDE/mintest/minlib/src/System/Attribute.bf +++ b/IDE/mintest/minlib/src/System/Attribute.bf @@ -346,6 +346,12 @@ namespace System } } + [AttributeUsage(.Method)] + public struct CommutableAttribute : Attribute + { + + } + [AttributeUsage(.Method | .Constructor)] public struct ErrorAttribute : Attribute { diff --git a/IDE/mintest/minlib/src/System/Object.bf b/IDE/mintest/minlib/src/System/Object.bf index 2e240d31..0e90653e 100644 --- a/IDE/mintest/minlib/src/System/Object.bf +++ b/IDE/mintest/minlib/src/System/Object.bf @@ -176,7 +176,7 @@ namespace System public int GetHashCode() { - return (int)mVal; + return (int)(void*)mVal; } } @@ -377,7 +377,7 @@ namespace System } } - struct Int : int, IOpComparable, IOpAddable, IIsNaN + struct Int : int, IOpComparable, IOpAddable, IOpDividable, IIsNaN { public static int operator<=>(Int a, Int b) { @@ -389,6 +389,11 @@ namespace System return (int)a + (int)b; } + public static Self operator/(Self a, Self b) + { + return (int)a / (int)b; + } + bool IIsNaN.IsNaN { [SkipCall]