KT-339 Allow to omit Unit return type from function types

This commit is contained in:
Andrey Breslav
2011-10-21 21:51:17 +04:00
parent a1deb4b86a
commit b905568147
4 changed files with 17 additions and 24 deletions
+1 -5
View File
@@ -47,11 +47,7 @@ optionalProjection
;
functionType
: "fun" (type ".")? functionTypeContents
;
functionTypeContents
: "(" (parameter | modifiers /*lazy out ref*/ type){","} ")" ":" type
: "fun" (type ".")? "(" (parameter | modifiers /*lazy out ref*/ type){","} ")" (":" type)? // Unit by default
;
tupleType