aboutsummaryrefslogtreecommitdiff
path: root/exercises
diff options
context:
space:
mode:
authorDave Gauer <dave@ratfactor.com>2021-02-10 21:44:11 -0500
committerDave Gauer <dave@ratfactor.com>2021-02-10 21:44:11 -0500
commit5b47e8ebe6cee0b89dbfe5a2ee413f83d3b7e4e0 (patch)
treee79c0ce35402781598f6fb7654cc8915fc4888ce /exercises
parent961cf22b88021e9c62d83bd840fe54f205c45f5f (diff)
downloadziglings-5b47e8ebe6cee0b89dbfe5a2ee413f83d3b7e4e0.tar.gz
ziglings-5b47e8ebe6cee0b89dbfe5a2ee413f83d3b7e4e0.tar.bz2
ziglings-5b47e8ebe6cee0b89dbfe5a2ee413f83d3b7e4e0.tar.xz
ziglings-5b47e8ebe6cee0b89dbfe5a2ee413f83d3b7e4e0.zip
Removed incorrect explanation of assignment error (#1)
It really has nothing to do with the if/else expression. The peer types are being resolved correctly. The same error can be produced with something as simple as: var foo = 5;
Diffstat (limited to 'exercises')
-rw-r--r--exercises/10_if2.zig8
1 files changed, 0 insertions, 8 deletions
diff --git a/exercises/10_if2.zig b/exercises/10_if2.zig
index 4f559cd..0925d18 100644
--- a/exercises/10_if2.zig
+++ b/exercises/10_if2.zig
@@ -3,14 +3,6 @@
//
// var foo: u8 = if (a) 2 else 3;
//
-// Note: You'll need to declare a variable type when assigning a value
-// from a statement like this because the compiler isn't smart enough
-// to infer the type for you.
-//
-// This WON'T work:
-//
-// var foo = if (a) 2 else 3; // error!
-//
const std = @import("std");
pub fn main() void {