scala/scala — pull request #2672 by som-snytt (2013-06-22 17:28:35+00:00)
Title: SI-6855: REPL emits error on partial pastie

If pasted code is interpreted with an incomplete result,
attempt to compile it to display an error.

Unfancily, the code is wrapped in an object for compilation.

```
scala> :pa
// Entering paste mode (ctrl-D to finish)

def f(

// Exiting paste mode, now interpreting.

The pasted code is incomplete!

:3: error: identifier expected but '}' found.
}
^

scala> :pa
// Entering paste mode (ctrl-D to finish)

class Bar {

// Exiting paste mode, now interpreting.

The pasted code is incomplete!

:2: error: Missing closing brace `}' assumed here
class Bar {
^

scala> :pa
// Entering paste mode (ctrl-D to finish)

def f[A

// Exiting paste mode, now interpreting.

The pasted code is incomplete!

:3: error: ']' expected but '}' found.
}
^

scala> :q

```