fix assigning value to type
This commit is contained in:
@@ -9,8 +9,9 @@ Vec4 :: Vector(4,f32);
|
||||
|
||||
main :: () {
|
||||
x : Type = f64;
|
||||
v:f64 = 3.2;
|
||||
print("{}\n", x);
|
||||
|
||||
v:f64 = 3.2;
|
||||
print("{}\n", v);
|
||||
|
||||
x = Vec4;
|
||||
@@ -18,6 +19,7 @@ main :: () {
|
||||
|
||||
x = test;
|
||||
print("{}\n", x);
|
||||
|
||||
}
|
||||
|
||||
// ** stdout **
|
||||
|
||||
@@ -2056,6 +2056,7 @@ pub const CodeGen = struct {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
return self.emitErrorFmt("cannot assign non-type value to Type variable '{s}'", .{name});
|
||||
}
|
||||
|
||||
// Union reassignment: s = .circle(3.14) or s = .none
|
||||
|
||||
Reference in New Issue
Block a user