diff --git a/docs/philosophy.md b/docs/philosophy.md index dd408fc..474a9b8 100644 --- a/docs/philosophy.md +++ b/docs/philosophy.md @@ -24,7 +24,7 @@ June is also geared towards application programming. Its direct OO approach coup ## Non-goal: Fine-grained memory reclamation -One characterist of June that you'll notice is that it prefers holding on to memory longer than other languages. You can think of this as a kind of memory "bloat" compared to more fine-grained allocation system. In one sense, the style is something more akin to garbage collection, though June does not use a garbage collector. +One characteristic of June that you'll notice is that it prefers holding on to memory longer than other languages. You can think of this as a kind of memory "bloat" compared to more fine-grained allocation system. In one sense, the style is something more akin to garbage collection, though June does not use a garbage collector. As it turns out, using intentional memory bloat is common. Rust and C++ developers, for example, use bloat to their advantage regularly. Take for example this Rust code: diff --git a/src/typechecker.rs b/src/typechecker.rs index d7860d2..639a8d9 100644 --- a/src/typechecker.rs +++ b/src/typechecker.rs @@ -2155,10 +2155,7 @@ impl Typechecker { } } - self.error( - format!("could not find enum case when created enum value"), - item, - ); + self.error("could not find enum case when created enum value", item); } AstNode::Name => { let case_name = self.compiler.get_source(item); diff --git a/tests/integration/extern_c/file_io_abstraction.june b/tests/integration/extern_c/file_io_abstraction.june index 74d3648..49f82fd 100644 --- a/tests/integration/extern_c/file_io_abstraction.june +++ b/tests/integration/extern_c/file_io_abstraction.june @@ -38,7 +38,7 @@ class File { } fun main() { - mut file = File::open(c"test_data/alphabet.txt"); + mut file = File::open(c"tests/test_data/alphabet.txt"); while true { let x = file.get_char(); diff --git a/tests/integration/extern_c/file_ptr.june b/tests/integration/extern_c/file_ptr.june index 39503af..5a8e2ed 100644 --- a/tests/integration/extern_c/file_ptr.june +++ b/tests/integration/extern_c/file_ptr.june @@ -7,7 +7,7 @@ extern "C" fun fclose(file: FILE?) -> c_int; extern "C" fun fgetc(file: FILE?) -> c_int; fun main() { - let file = fopen(c"test_data/alphabet.txt", c"rb"); + let file = fopen(c"tests/test_data/alphabet.txt", c"rb"); if file != none { let x = fgetc(file) println(x as c_char) diff --git a/tests/integration/extern_c/file_ptr_all.june b/tests/integration/extern_c/file_ptr_all.june index 8cb9c9b..48b5098 100644 --- a/tests/integration/extern_c/file_ptr_all.june +++ b/tests/integration/extern_c/file_ptr_all.june @@ -7,7 +7,7 @@ extern "C" fun fclose(file: FILE?) -> c_int; extern "C" fun fgetc(file: FILE?) -> c_int; fun main() { - let file = fopen(c"test_data/alphabet.txt", c"rb"); + let file = fopen(c"tests/test_data/alphabet.txt", c"rb"); if file != none { mut c = fgetc(file) while c != -1 && c != 10 && c != 13 { diff --git a/tests/integration/extern_c/file_ptr_defer.june b/tests/integration/extern_c/file_ptr_defer.june index 2bb2c83..7d63919 100644 --- a/tests/integration/extern_c/file_ptr_defer.june +++ b/tests/integration/extern_c/file_ptr_defer.june @@ -12,7 +12,7 @@ fun cleanup(f: FILE?) { } fun main() { - let file = fopen(c"test_data/alphabet.txt", c"rb"); + let file = fopen(c"tests/test_data/alphabet.txt", c"rb"); defer file cleanup if file != none { let x = fgetc(file) diff --git a/test_data/alphabet.txt b/tests/test_data/alphabet.txt similarity index 100% rename from test_data/alphabet.txt rename to tests/test_data/alphabet.txt