| 1 | struct Foo { |
| 2 | name string |
| 3 | } |
| 4 | |
| 5 | type Foo1 = [2][2]int |
| 6 | type Foo2 = []int |
| 7 | type Foo3 = Foo |
| 8 | |
| 9 | fn test_alias_compare_non_alias_value() { |
| 10 | f1 := Foo1([[1, 2]!, [3, 4]!]!) |
| 11 | assert f1 == [[1, 2]!, [3, 4]!]! |
| 12 | assert [[1, 2]!, [3, 4]!]! == f1 |
| 13 | |
| 14 | f2 := Foo2([1, 2, 3, 4]) |
| 15 | assert f2 == [1, 2, 3, 4] |
| 16 | assert [1, 2, 3, 4] == f2 |
| 17 | |
| 18 | f3 := Foo3(Foo{'hello'}) |
| 19 | assert f3 == Foo{'hello'} |
| 20 | assert Foo{'hello'} == f3 |
| 21 | } |
| 22 |