From 97d7324874ca4bdaa328121eacdaa07d11d119b9 Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Mon, 4 Jan 2021 13:57:28 -0800 Subject: [PATCH] Fixed fail test --- IDE/Tests/CompileFail001/src/Generics.bf | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/IDE/Tests/CompileFail001/src/Generics.bf b/IDE/Tests/CompileFail001/src/Generics.bf index 8f1d18b4..1a76f722 100644 --- a/IDE/Tests/CompileFail001/src/Generics.bf +++ b/IDE/Tests/CompileFail001/src/Generics.bf @@ -6,9 +6,9 @@ namespace System { extension Array1 { - public static bool operator==(Self lhs, Self rhs) where T : IOpEquals + public static Self operator+(Self lhs, Self rhs) where T : IDisposable { - return true; + return lhs; } } } @@ -29,12 +29,12 @@ namespace IDETest public void Method3(ref TFoo[] val) { - bool eq = val == val; //FAIL Generic argument 'T', declared to be 'TFoo' for 'TFoo[].operator==(TFoo[] lhs, TFoo[] rhs)', must implement 'System.IOpEquals' + var res = val + val; //FAIL } - public void Method4() + public void Method4(ref TFoo[] val) where TFoo : IDisposable { - + var res = val + val; } interface IFaceA