Skip to content

Commit 945b058

Browse files
committed
added sky tower
1 parent 7e119b4 commit 945b058

File tree

6 files changed

+565
-1
lines changed

6 files changed

+565
-1
lines changed

Diff for: .vimrc

+2
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,8 @@ nnoremap <leader><leader>dts :DTSUIT<cr>
197197
nnoremap <leader><leader>to :TONE<cr>
198198
nnoremap <leader><leader>dto :DTONE<cr>
199199
nnoremap <leader><leader>tc :BENCHMARK<cr>
200+
map <leader><leader>L i<
201+
map <leader><leader>G i>
200202
201203
command! -nargs=1 Rename call s:clangRename(<f-args>)
202204
exe "hi clangOutError ctermfg="g:ColorStatement

Diff for: lib/dialect/src/EmitImplicitDestructorInvocationsPass.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,8 @@ namespace mlir::rlc
472472
llvm::DenseMap<mlir::Type, bool> requireDestructor;
473473

474474
fun->walk([&](mlir::Operation* op) {
475-
if (not mlir::isa<mlir::rlc::DeclarationStatement>(op))
475+
auto casted = mlir::dyn_cast<mlir::rlc::DeclarationStatement>(op);
476+
if (not casted or casted.isReference())
476477
return;
477478
for (mlir::Value result : op->getResults())
478479
if (typeRequiresDestructor(

Diff for: stdlib/collections/vector.rl

+4
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ cls<T> Vector:
3636
counter = 0
3737
while counter < self._size:
3838
new_data[counter] = self._data[counter]
39+
counter = counter + 1
40+
41+
counter = 0
42+
while counter < self._capacity:
3943
__builtin_destroy_do_not_use(self._data[counter])
4044
counter = counter + 1
4145

Diff for: tool/rlc/test/enumeration_errors.rl

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# RUN: rlc %s -o %t -i %stdlib
2+
# RUN: %t%exeext | FileCheck %s
3+
4+
5+
import action
6+
7+
8+
cls TopLevel:
9+
# CHECK: a is of type Int, which is not enumerable. Replace it instead with a BInt with appropriate bounds or specify yourself how to enumerate it.
10+
Int a
11+
# CHECK-NEXT: b is of type Float, which is not enumerable. Specify yourself how to enumerate it.
12+
Float b
13+
Bool[3] c
14+
Vector<BInt<0, 3>> f
15+
16+
act play() -> Game:
17+
# CHECK: GameDoNothing.a is of type Int, which is not enumerable. Replace it instead with a BInt with appropriate bounds or specify yourself how to enumerate it.
18+
act do_nothing(Int a, Bool b)
19+
20+
fun main() -> Int:
21+
let y : TopLevel
22+
let state : AnyGameAction
23+
print(get_enumeration_errors(y))
24+
print(get_enumeration_errors(state))
25+
return 0

0 commit comments

Comments
 (0)