@@ -2793,6 +2793,17 @@ TypeConverter::getTypeLowering(AbstractionPattern origType,
27932793}
27942794
27952795namespace swift ::test {
2796+ static FunctionTest PrintASTTypeLowering (
2797+ " print_ast_type_lowering" , [](auto &function, auto &arguments, auto &test) {
2798+ auto value = arguments.takeValue ();
2799+ auto silTy = value->getType ();
2800+ auto canTy = silTy.getRawASTType ();
2801+ auto *ty = canTy.getPointer ();
2802+ function.getModule ()
2803+ .Types .getTypeLowering (AbstractionPattern (ty), ty, function)
2804+ .print (llvm::outs ());
2805+ });
2806+
27962807// Arguments:
27972808// - value: whose type will be printed
27982809// Dumps:
@@ -3034,6 +3045,7 @@ void TypeConverter::verifyTrivialLowering(const TypeLowering &lowering,
30343045 // unconditionally but in this particular instantiation is trivial
30353046 // (3) being a special type that's not worth forming a conformance for
30363047 // - ModuleType
3048+ // - SILTokenType
30373049 // (4) being an unowned(unsafe) reference to a class/class-bound existential
30383050 // NOTE: ReferenceStorageType(C) does not conform HOWEVER the presence
30393051 // of an unowned(unsafe) field within an aggregate DOES NOT allow
@@ -3076,7 +3088,7 @@ void TypeConverter::verifyTrivialLowering(const TypeLowering &lowering,
30763088
30773089 // ModuleTypes are trivial but don't warrant being given a
30783090 // conformance to BitwiseCopyable (case (3)).
3079- if (isa<ModuleType>(ty)) {
3091+ if (isa<ModuleType, SILTokenType >(ty)) {
30803092 // These types should never appear within aggregates.
30813093 assert (isTopLevel && " aggregate containing marker type!?" );
30823094 // If they did, though, they would not justify the aggregate's
0 commit comments