@@ -493,6 +493,10 @@ ERROR(cannot_convert_yield_value_protocol,none,
493493ERROR(cannot_convert_yield_value_nil,none,
494494 " nil is not compatible with expected yield type %0" , (Type))
495495
496+ ERROR(cannot_convert_forget_value,none,
497+ " cannot convert value of type %0 to expected forget type %1" ,
498+ (Type,Type))
499+
496500ERROR(cannot_convert_closure_result,none,
497501 " cannot convert value of type %0 to closure result type %1" ,
498502 (Type,Type))
@@ -4497,6 +4501,27 @@ ERROR(opaque_type_var_no_underlying_type,none,
44974501 " property declares an opaque return type, but cannot infer the "
44984502 " underlying type from its initializer expression" , ())
44994503
4504+ ERROR(forget_wrong_context_decl,none,
4505+ " 'forget' statement cannot appear in %0" ,
4506+ (DescriptiveDeclKind))
4507+ ERROR(forget_wrong_context_closure,none,
4508+ " 'forget' statement cannot appear in closure" ,
4509+ ())
4510+ ERROR(forget_wrong_context_misc,none,
4511+ " 'forget' statement cannot appear in this context" ,
4512+ ())
4513+ ERROR(forget_wrong_context_copyable,none,
4514+ " 'forget' statement can only appear in noncopyable type's member" ,
4515+ (DescriptiveDeclKind))
4516+ ERROR(forget_wrong_context_nonconsuming,none,
4517+ " 'forget' statement can only appear in consuming %0" ,
4518+ (DescriptiveDeclKind))
4519+ ERROR(forget_wrong_not_self,none,
4520+ " you can only forget 'self'" , ())
4521+ ERROR(forget_wrong_module,none,
4522+ " can only 'forget' from the same module defining type %0" ,
4523+ (Type))
4524+
45004525// ------------------------------------------------------------------------------
45014526// MARK: Type Check Patterns
45024527// ------------------------------------------------------------------------------
0 commit comments