mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-06 08:54:47 +01:00
fix: incorrect index in TypeEqual for ConstraintType (#2754)
Just a typo. Closes #2727
This commit is contained in:
@@ -832,7 +832,7 @@ auto TypeEqual(Nonnull<const Value*> t1, Nonnull<const Value*> t2,
|
||||
return false;
|
||||
}
|
||||
for (size_t j = 0; j < equality1.values.size(); ++j) {
|
||||
if (!ValueEqual(equality1.values[i], equality2.values[i],
|
||||
if (!ValueEqual(equality1.values[j], equality2.values[j],
|
||||
equality_ctx)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
|
||||
// Exceptions. See /LICENSE for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
// AUTOUPDATE
|
||||
// RUN: %{explorer-run}
|
||||
// RUN: %{explorer-run-trace}
|
||||
// CHECK:STDOUT: result: 0
|
||||
|
||||
package ExplorerTest api;
|
||||
|
||||
interface IFace {}
|
||||
|
||||
impl {.IFace : (type where type == i32 and type == i32 and type == i32, )} as IFace {
|
||||
}
|
||||
|
||||
fn Main() -> i32 {
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user