Skip to content

Commit 986ae32

Browse files
committed
Document why things are @frozen.
1 parent b66f4d4 commit 986ae32

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

Sources/SwiftSyntax/Raw/RawSyntaxNodes.swift.gyb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public struct Raw${node.name}: Raw${node.name if node.is_base() else node.base_t
3939
% enums.append(('Element', [(NODE_MAP[choice_name].swift_syntax_kind, NODE_MAP[choice_name].name) for choice_name in node.collection_element_choices]))
4040
% end
4141
% for (name, choices) in enums:
42-
@frozen
42+
@frozen // FIXME: Not actually stable, works around a miscompile
4343
public enum ${name}: RawSyntaxNodeProtocol {
4444
% for (swift_name, type_name) in choices:
4545
case `${swift_name}`(Raw${type_name})

Sources/SwiftSyntax/SyntaxCollections.swift.gyb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public extension SyntaxCollection {
4545
% end
4646
public struct ${node.name}: SyntaxCollection, SyntaxHashable {
4747
% if node.collection_element_choices:
48-
@frozen
48+
@frozen // FIXME: Not actually stable, works around a miscompile
4949
public enum Element: SyntaxChildChoices {
5050
% for choice_name in node.collection_element_choices:
5151
% choice = NODE_MAP[choice_name]

Sources/SwiftSyntax/SyntaxEnum.swift.gyb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
//===----------------------------------------------------------------------===//
2121

2222
/// Enum to exhaustively switch over all different syntax nodes.
23-
@frozen
23+
@frozen // FIXME: Not actually stable, works around a miscompile
2424
public enum SyntaxEnum {
2525
case unknown(UnknownSyntax)
2626
case token(TokenSyntax)

Sources/SwiftSyntax/SyntaxKind.swift.gyb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
//===----------------------------------------------------------------------===//
2020

2121
/// Enumerates the known kinds of Syntax represented in the Syntax tree.
22-
@frozen
22+
@frozen // FIXME: Not actually stable, works around a miscompile
2323
public enum SyntaxKind {
2424
case token
2525
case unknown

Sources/SwiftSyntax/TokenKind.swift.gyb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
//===----------------------------------------------------------------------===//
1919

2020
/// Enumerates the kinds of tokens in the Swift language.
21-
@frozen
21+
@frozen // FIXME: Not actually stable, works around a miscompile
2222
public enum TokenKind: Hashable {
2323
case eof
2424
% for token in SYNTAX_TOKENS:
@@ -144,7 +144,7 @@ extension TokenKind: Equatable {
144144
}
145145

146146
/// Plain token kind value, without an associated `String` value.
147-
@frozen
147+
@frozen // FIXME: Not actually stable, works around a miscompile
148148
public enum RawTokenKind: Equatable, Hashable {
149149
case eof
150150
% for token in SYNTAX_TOKENS:

0 commit comments

Comments
 (0)