Add a compile-time check that the condition of a CHECK is not constant. (#4628)

Inspired by #4624.
This commit is contained in:
Richard Smith
2024-12-04 22:29:35 +00:00
committed by GitHub
parent 65166dc27b
commit a45cb86bf7
5 changed files with 77 additions and 22 deletions
+1 -1
View File
@@ -1351,7 +1351,7 @@ auto TypeChecker::ArgumentDeduction::Deduce(Nonnull<const Value*> param,
}
case Value::Kind::MixinPseudoType:
case Value::Kind::TypeOfMixinPseudoType:
CARBON_CHECK(false, "Type expression must not contain Mixin types");
CARBON_FATAL("Type expression must not contain Mixin types");
}
}