mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
RequirementMachine: Opaque archetype support (sort of)
Complete support is behind a flag, because it can result in a non-convergent rewrite system if the opaque result type has a recursive conformance of its own (eg, `some View` for SwiftUI's View protocol). Without the flag, it's good enough for simple examples; you just can't have a requirement that mentions a nested type of a type parameter equated to the concrete type. Fixes rdar://problem/88135291, https://bugs.swift.org/browse/SR-15983.
This commit is contained in:
@@ -1004,6 +1004,9 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
|
||||
if (Args.hasArg(OPT_enable_requirement_machine_loop_normalization))
|
||||
Opts.EnableRequirementMachineLoopNormalization = true;
|
||||
|
||||
if (Args.hasArg(OPT_enable_requirement_machine_opaque_archetypes))
|
||||
Opts.EnableRequirementMachineOpaqueArchetypes = true;
|
||||
|
||||
Opts.DumpTypeWitnessSystems = Args.hasArg(OPT_dump_type_witness_systems);
|
||||
|
||||
return HadError || UnsupportedOS || UnsupportedArch;
|
||||
|
||||
Reference in New Issue
Block a user