We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0f5a631 commit 8280afeCopy full SHA for 8280afe
Sources/SwiftParser/Expressions.swift
@@ -883,7 +883,7 @@ extension Parser {
883
// 'any' followed by another identifier is an existential type.
884
if self.atContextualKeyword("any"),
885
self.peek().tokenKind == .identifier,
886
- self.peek().isAtStartOfLine
+ !self.peek().isAtStartOfLine
887
{
888
let ty = self.parseType()
889
return RawExprSyntax(RawTypeExprSyntax(type: ty, arena: self.arena))
Tests/SwiftParserTest/Expressions.swift
@@ -491,4 +491,8 @@ final class ExpressionTests: XCTestCase {
491
substructureAfterMarker: "ASYNC"
492
)
493
}
494
+
495
+ func testTypeExpression() {
496
+ AssertParse("_ = (any Sequence<Int>).self")
497
+ }
498
0 commit comments