diff options
author | Marek Safar <marek.safar@gmail.com> | 2004-06-21 16:07:23 +0400 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2004-06-21 16:07:23 +0400 |
commit | 8dd59d76593c2d0d9858291b93c9f33b2d388ceb (patch) | |
tree | 22d61b97067f58f27eb6df11432283fced680679 /mcs/errors/cs0661.cs | |
parent | 092ade872e8891a9063fe4c68fa81635f4905ecc (diff) |
new tests
svn path=/trunk/mcs/; revision=30026
Diffstat (limited to 'mcs/errors/cs0661.cs')
-rw-r--r-- | mcs/errors/cs0661.cs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/mcs/errors/cs0661.cs b/mcs/errors/cs0661.cs new file mode 100644 index 00000000000..7515e144c21 --- /dev/null +++ b/mcs/errors/cs0661.cs @@ -0,0 +1,21 @@ +// cs0661.cs: 'T' defines operator == or operator != but does not override Object.GetHashCode() +// Line: 5 +// Compiler options: -warnaserror -warn:3 + +class T +{ + public static bool operator == (object o, T t) + { + return false; + } + + public static bool operator != (object o, T t) + { + return true; + } + + public override bool Equals(object o) + { + return true; + } +} |