Commit Graph
6 Commits
Author SHA1 Message Date
Jon Meow 6d822ababb Rename main to Main for Carbon style consistency (#939)
Main() is more consistency with Carbon's naming guidelines. C# offers some precedent: https://docs.microsoft.com/en-us/dotnet/csharp/fundamentals/program-structure/main-command-line
2021-11-02 14:53:18 -07:00
Jon Meow 91b99b1148 Test tuple indexing (#908) 2021-10-21 10:49:28 -07:00
Geoff Romer bb28d37eed Drop support for named tuple fields (#886)
Rationale: Based on the status of #478 and #505, Carbon won't have this feature for a while, and it will be simpler not to support it on spec in the meantime.
2021-10-15 13:19:57 -07:00
Geoff RomerandJon Meow c2140c6cb9 Check exhaustiveness of function-ending match statements (#882)
Co-authored-by: Jon Meow <46229924+jonmeow@users.noreply.github.com>
2021-10-13 16:04:43 -07:00
Geoff RomerandJon Meow bc5a42211b Support struct implicit conversions in type-checking (#870)
I should emphasize that I am **completely cheating** here. This PR does not add support for actually _performing_  implicit conversions at run time, because the AST doesn't yet contain the necessary type information. At run time, code like `var p: Point = {.x = 1, .y = 2};` directly initializes the name `p` with the _struct_ value `{.x = 1, .y = 2}`; no object of type `Point` is actually created. I'm only getting away with this because we don't yet have any tests that can tell the difference.

Co-authored-by: Jon Meow <46229924+jonmeow@users.noreply.github.com>
2021-10-12 10:27:20 -07:00
Jon Meow 395a331cde Reorganize tests into dirs and rename numbered tests (#825)
There's a small update to update_checks.py to handle the recursive directories. Also, I'm only using one level of nesting in this PR but really no reason we can't do more. I'm just not sure what clustering is best right now.

As a pattern, I'm trying to name all failing tests `fail_*.carbon`.
2021-09-15 16:37:34 -07:00