mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Foo.is_eq would return false if the type was a typedef and had an overload, but the underlying type was not comparable. Version 0.7.8.
This commit is contained in:
12
test/test_suite/distinct/distinct_is_eq.c3
Normal file
12
test/test_suite/distinct/distinct_is_eq.c3
Normal file
@@ -0,0 +1,12 @@
|
||||
module test;
|
||||
import std;
|
||||
struct Boo { int a; }
|
||||
typedef Foo = Boo;
|
||||
|
||||
fn bool Foo.eq(Foo a, Foo b) @operator(==) => false;
|
||||
|
||||
fn int main()
|
||||
{
|
||||
$assert Foo.is_eq;
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user