shiika
shiika copied to clipboard
A statically-typed programming language
## Given ``` a = true if a x = 1 end p x ``` ## Expected Compile error ## Actual Prints 1. (EXC_BAD_ACCESS if `a = false`)
## GIven ``` 123 .to_s ``` ## Expected no error ## Actual ``` Error: Error: unexpected token: Dot ╭─[a.sk:8:3] │ 8 │ .to_s · ─ · ───╯ ) ```
## Given ``` p(1) # prints one if 1 == 1 end ``` ## Got > Error: Error: unexpected token: ModIf ## Expected Prints `1`
## Given ```sk class A def to_s # Forgot `-> String` "??" end end puts A.new.to_s ``` ## Actual > Error: the argument `str' of `Object#puts' should be String but...
## Given ```sk enum A case Value(i: Int) end p A::Value.new(1) == A::Value.new(1) ``` ## Expected `true` (Call `#==` recursively)
## Given Enumerable.zip([1,2], [3,4]) ## Expected Some error message from the compiler ## Actual > thread 'main' panicked at 'index out of bounds: the len is 1 but the index...
## Given ```sk var a = None a = Some.new(123) p a ``` ## Expected prints Some(123) ## Actual > error: Explicit load/store type does not match pointee type of...
## Given ```sk class A def to_s "#" end end ``` ## Expected compile error (because this method overrides `Object#to_s` so the return type must be `String`) ## Actual compiled...