mirror of
https://github.com/github/codeql.git
synced 2026-05-03 04:39:29 +02:00
QL code and tests for C#/C++/JavaScript.
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
using System;
|
||||
|
||||
class ClassMissingGetHashCode
|
||||
{
|
||||
public override bool Equals(object other)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public new int GetHashCode()
|
||||
{ // not overridden
|
||||
return 42;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class ClassMissingEquals
|
||||
{
|
||||
public new bool Equals(object other)
|
||||
{ // not overridden
|
||||
return false;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return 42;
|
||||
}
|
||||
}
|
||||
|
||||
class Class
|
||||
{
|
||||
public override bool Equals(object other)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return 42;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user