mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
AST: Remove ParameterTypeFlags::Escaping
Escapingness is a property of the type of a value, not a property of a function parameter. Having it as a separate parameter flag just meant one more piece of state that could get out of sync and cause weird problems. Instead, always look at the noescape bit in a function type as the canonical source of truth. This does mean that '@escaping' is now printed in a few diagnostics where it was not printed before; we can investigate these as separate issues, but it is correct to print it there because the function types in question are, in fact, escaping. Fixes <https://bugs.swift.org/browse/SR-10256>, <rdar://problem/49522774>.
This commit is contained in:
@@ -3953,7 +3953,7 @@ void Serializer::writeType(Type ty) {
|
||||
FunctionParamLayout::emitRecord(
|
||||
Out, ScratchRecord, abbrCode, addDeclBaseNameRef(param.getLabel()),
|
||||
addTypeRef(param.getPlainType()), paramFlags.isVariadic(),
|
||||
paramFlags.isAutoClosure(), paramFlags.isEscaping(), rawOwnership);
|
||||
paramFlags.isAutoClosure(), rawOwnership);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user