Skip to content

[AST] Fix argument to diagnostic #1016

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 20, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/swift/AST/DiagnosticsSema.def
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ ERROR(cannot_throw_nil,none,
ERROR(cannot_convert_raw_initializer_value,none,
"cannot convert value of type %0 to raw type %1", (Type,Type))
ERROR(cannot_convert_raw_initializer_value_nil,none,
"cannot convert nil to raw type %1", (Type))
"cannot convert nil to raw type %0", (Type))

ERROR(cannot_convert_default_arg_value,none,
"default argument value of type %0 cannot be converted to type %1",
Expand Down
4 changes: 4 additions & 0 deletions test/Parse/enum.swift
Original file line number Diff line number Diff line change
Expand Up @@ -429,3 +429,7 @@ public protocol RawValueB
enum RawValueBTest: Double, RawValueB {
case A, B
}

enum foo : String {
case bar = nil // expected-error {{cannot convert nil to raw type 'String'}}
}