mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Rename '_const' attribute to 'CompileTimeLiteral'
To pave the way for the new experimental feature which will operate on '@const' attribute and expand the scope of what's currently handled by '_const' without breaking compatibility, for now.
This commit is contained in:
@@ -1922,11 +1922,11 @@ static ConstraintSystem::TypeMatchResult matchCallArguments(
|
||||
}
|
||||
}
|
||||
|
||||
if (!argument.isCompileTimeConst() && param.isCompileTimeConst()) {
|
||||
if (!argument.isCompileTimeLiteral() && param.isCompileTimeLiteral()) {
|
||||
auto *locator = cs.getConstraintLocator(loc);
|
||||
SourceRange range;
|
||||
// simplify locator so the anchor is the exact argument.
|
||||
cs.recordFix(NotCompileTimeConst::create(cs, paramTy,
|
||||
cs.recordFix(NotCompileTimeLiteral::create(cs, paramTy,
|
||||
simplifyLocator(cs, locator, range)));
|
||||
}
|
||||
|
||||
@@ -8295,7 +8295,7 @@ ConstraintSystem::simplifyConstructionConstraint(
|
||||
auto &arg = fnType->getParams()[idx];
|
||||
|
||||
// We can disregard '_const', it's not applicable for tuple construction.
|
||||
auto flags = arg.getParameterFlags().withCompileTimeConst(false);
|
||||
auto flags = arg.getParameterFlags().withCompileTimeLiteral(false);
|
||||
|
||||
// We cannot handle inout for tuple construction.
|
||||
if (flags.isInOut()) {
|
||||
@@ -15504,7 +15504,7 @@ ConstraintSystem::SolutionKind ConstraintSystem::simplifyFixConstraint(
|
||||
case FixKind::RemoveExtraneousArguments:
|
||||
case FixKind::SpecifyTypeForPlaceholder:
|
||||
case FixKind::AllowAutoClosurePointerConversion:
|
||||
case FixKind::NotCompileTimeConst:
|
||||
case FixKind::NotCompileTimeLiteral:
|
||||
case FixKind::RenameConflictingPatternVariables:
|
||||
case FixKind::AllowInvalidPackElement:
|
||||
case FixKind::AllowInvalidPackReference:
|
||||
|
||||
Reference in New Issue
Block a user