Skip to content

Commit b32c60d

Browse files
committed
---
yaml --- r: 349601 b: refs/heads/master-next c: d5cabc3 h: refs/heads/master i: 349599: 56192a2
1 parent 4f85466 commit b32c60d

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
refs/heads/master: 3574c513bbc5578dd9346b4ea9ab5995c5927bb5
3-
refs/heads/master-next: 182c0ccd6ba126777577f0f5e7cf5aa86472eb03
3+
refs/heads/master-next: d5cabc36ad6d0d948211726e0359f9d143b8dd65
44
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
55
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea
66
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-b: 66d897bfcf64a82cb9a87f5e663d889189d06d07

branches/master-next/lib/Parse/ParseType.cpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -209,11 +209,9 @@ Parser::TypeResult Parser::parseTypeSimple(Diag<> MessageID,
209209
}
210210

211211
// '.Type', '.Protocol', '?', '!', and '[]' still leave us with type-simple.
212-
while (Result->isSuccess() || !Result->getUnknownNodes().empty()) {
213-
auto PrevType = Result->isSuccess()
214-
? Result->getResult()
215-
: ParsedSyntaxRecorder::makeUnknownType(
216-
Result->getUnknownNodes(), *SyntaxContext);
212+
while (Result->isSuccess()) {
213+
auto PrevType = Result->getResult();
214+
217215
if ((Tok.is(tok::period) || Tok.is(tok::period_prefix)) &&
218216
(peekToken().isContextualKeyword("Type") ||
219217
peekToken().isContextualKeyword("Protocol"))) {
@@ -236,9 +234,6 @@ Parser::TypeResult Parser::parseTypeSimple(Diag<> MessageID,
236234
continue;
237235
}
238236
}
239-
if (!Result->isSuccess())
240-
Result =
241-
makeParsedResult<ParsedTypeSyntax>({PrevType}, Result->getStatus());
242237
break;
243238
}
244239

branches/master-next/test/IDE/complete_type.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,8 @@
400400
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=UNBOUND_DOT | %FileCheck %s -check-prefix=UNBOUND_DOT
401401
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=UNBOUND_DOT_2 | %FileCheck %s -check-prefix=UNBOUND_DOT_2
402402

403+
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=GENERICARG_OPTIONAL | %FileCheck %s -check-prefix=GENERICARG_OPTIONAL
404+
403405
//===--- Helper types that are used in this test
404406

405407
struct FooStruct {
@@ -1129,3 +1131,6 @@ func testUnbound2(x: OuterStruct<Int>.Inner.#^UNBOUND_DOT_2^#) {}
11291131
// UNBOUND_DOT_2: Begin completions
11301132
// UNBOUND_DOT_2-DAG: Keyword/None: Type[#OuterStruct<Int>.Inner.Type#]; name=Type
11311133
// UNBOUND_DOT_2: End completions
1134+
1135+
func testGenericArgForOptional() -> Set<#^GENERICARG_OPTIONAL^#>? {}
1136+
// GENERICARG_OPTIONAL: Begin completions

0 commit comments

Comments
 (0)