shiika
shiika copied to clipboard
A statically-typed programming language
``` # :-( 3.times{|x: Int| ... } # :-) 3.times{|x| ... } ``` The type of `x` should be inferred from the signature of `Int#times`.
``` while false while false; end break end ``` > Error: Error { msg: "break outside of a loop", backtrace: 0: backtrace::backtrace::libunwind::trace
``` // TODO: should be a LexError panic!("found unterminated string"); ``` Lexer should return `Result` rather than using `panic!`.
In .ll, `store %Int* %sk_int, %Int** @"::BYTES_OF_PTR"` appears twice; one in `@"init_::BYTES_OF_PTR"()`, one in `UserMain:`.
This should be valid: ``` def foo; end a = foo # a is the instance of Void ``` cf. ``` let a = (); // Unit type ```
`super` calls the inherited function.
eg. ``` class Base A = 1 end class Sub : Base def foo puts A #=> 1 end end ```