Skip to content

Commit

Permalink
fix more warns
Browse files Browse the repository at this point in the history
  • Loading branch information
StunxFS committed Jan 28, 2024
1 parent 0af0824 commit c55ef52
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 1 addition & 3 deletions cmd/src/tools/cmd_new.ri
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ pub func cmd_new(args: [:]string, is_init: bool) -> ! {
utils.error(err_fp.to_string())
};

mut project := Project();
mut project := Project(version: semver.Version.build(0, 1, 0));
if is_init {
project.name = Path.base_name(process.get_cwd()!);
} else {
Expand All @@ -72,8 +72,6 @@ pub func cmd_new(args: [:]string, is_init: bool) -> ! {
project.version = semver.Version.from_string(version) catch |err| {
utils.error(err.to_string())
};
} else {
project.version = semver.Version.build(0, 1, 0);
}
if license := readln("License (optional):") {
project.license = license;
Expand Down
4 changes: 2 additions & 2 deletions lib/rivet/src/ast/Expr.ri
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ pub enum Expr < traits.Stringable {
pos: token.Pos;
mut found: bool;
mut sym: ^mut TypeSym := invalid_type_sym;
mut obj: ^mut Var;
mut obj: ^mut Var := ^mut Var();
mut type: ^mut Type;
},
NoneLiteral {
Expand Down Expand Up @@ -176,7 +176,7 @@ pub enum Expr < traits.Stringable {
mut err_handler: CallErrorHandler;
pos: token.Pos;
mut type: ^mut Type;
mut func_: ^mut Func;
mut func_: ^mut Func := ^mut Func();

mut is_closure: bool;
mut is_constructor: bool;
Expand Down
2 changes: 1 addition & 1 deletion lib/rivet/src/checker/mod.ri
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub struct Checker {

mut source_file: ^mut ast.SourceFile;
sym: ^mut ast.Sym := ast.InvalidSym();
mut cur_func: ^mut ast.Func;
mut cur_func: ^mut ast.Func := ^mut ast.Func();

mut inside_extern: bool;
mut inside_test: bool;
Expand Down

0 comments on commit c55ef52

Please sign in to comment.