## Compiler version v3.6.3 ## Minimized code <!-- This code should be self contained, compilable (with possible failures) and as small as possible. Ideally, we should be able to just copy this code in a file and run `scalac` (and maybe `scala`) to reproduce the issue. --> ```Scala @main def main = val y = ( if (true) val x = 1 //error 5 else 7 ) ``` ## Output ```scala expression expected but val found ``` ## Expectation No error.