Files
swift-mirror/test/Parse/switch_incomplete.swift
Joe Groff a91ee5e1a0 Make sure 'switch' source ranges encapsulate their 'case's, even when incomplete.
Fixes <rdar://problem/15971438>.

Swift SVN r13395
2014-02-03 23:50:17 +00:00

7 lines
277 B
Swift

// RUN: %swift -parse -verify %s
// <rdar://problem/15971438> Incomplete switch was parsing to an AST that
// triggered an assertion failure.
switch 1 { // expected-note{{to match this opening '{'}}
case 1: // expected-error@+1{{expected '}' at end of 'switch' statement}}