mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-19 10:00:29 +00:00
Convert the scrutinee of a binding pattern to the right category. (#5662)
When the binding pattern appears within a `var` pattern, convert to a reference. Otherwise, convert to a value. This gets the advent of code examples to produce the right answers again :) --------- Co-authored-by: Geoff Romer <gromer@google.com>
This commit is contained in:
1 parent
1c09de9b87
commit
80529aaef9
29 files changed
+317
-260
No files matched your search
@@ -51,6 +51,13 @@ constexpr Kind UntestedKinds[] = {
|
||||
// - Require all diagnostics produced by compiling have their first location
|
||||
// be in the file being compiled, never an import.
|
||||
Kind::LanguageServerDiagnosticInWrongFile,
|
||||
|
||||
// TODO: This can only fire if we attempt to convert a non-reference
|
||||
// expression to a durable reference binding. At the moment, the only time
|
||||
// we attempt reference binding is within a `var` pattern, where the
|
||||
// conversion cannot fail. This should be covered once we support `ref`
|
||||
// binding syntax.
|
||||
Kind::ConversionFailureNonRefToRef,
|
||||
};
|
||||
|
||||
// Looks for diagnostic kinds that aren't covered by a file_test.
|
||||
|
||||
Reference in new issue
Block a user