Add the abitlity to assign during a declaration and type inference if no type given but there is an expression

This commit is contained in:
Nathan Braswell
2016-01-17 01:10:09 -05:00
parent 9c41c2fd12
commit bffedcf2fd
4 changed files with 35 additions and 9 deletions

View File

@@ -15,7 +15,10 @@ fun main(): int {
var a_declaration:int
a_declaration = 78
simple_print(a_declaration)
/*var another_declaration = 9*/
var another_declaration: int = 8.0
simple_print(another_declaration)
var yet_another_declaration = "Hello Marcus\n"
simple_print(yet_another_declaration)
simple_print("Hello World!\n")
simple_print(1337)
return 0