Skip to content

Commit e87cf29

Browse files
[NFC] Add some notes to getASTType()'s docstring.
1 parent 4dac0d1 commit e87cf29

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

include/swift/SIL/SILType.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,17 @@ class SILType {
159159
}
160160

161161
/// Returns the canonical AST type referenced by this SIL type.
162+
///
163+
/// NOTE:
164+
/// 1. The returned AST type may not be a proper formal type.
165+
/// For example, it may contain a SILFunctionType instead of a
166+
/// FunctionType.
167+
/// 2. The returned type may not be the same as the original
168+
/// unlowered type that produced this SILType (even after
169+
/// canonicalization). If you need it, you must pass it separately.
170+
/// For example, `AnyObject.Type` may get lowered to
171+
/// `$@thick AnyObject.Type`, for which the AST type will be
172+
/// `@thick AnyObject.Type`.
162173
CanType getASTType() const {
163174
return CanType(value.getPointer());
164175
}

0 commit comments

Comments
 (0)