From 70e274b016a0a285ed62e03193ffa27d3d94b1be Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sun, 20 Nov 2016 11:23:58 +0800 Subject: HIR Typecheck Expr - Hack around quirk where a cast can be a type hint --- Notes/Quirks.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Notes') diff --git a/Notes/Quirks.md b/Notes/Quirks.md index 2b0705a9..d3b7839d 100644 --- a/Notes/Quirks.md +++ b/Notes/Quirks.md @@ -52,5 +52,9 @@ The "base" value of a struct literal isn't always moved Binops are coercion points ========================== +- This only really shows up with some edge cases where the RHS is inferred +Casts can act as coercions +========================== +- E.g. `None as Option` is perfectly valid, and is the same as `None::` -- cgit v1.2.3