ceylon / ceylon-compiler

DEPRECATED
GNU General Public License v2.0
138 stars 36 forks source link

Incompatible types: Object vs void with invocation of grouped expression #2409

Open lucaswerkmeister opened 8 years ago

lucaswerkmeister commented 8 years ago
Anything a = (print)("");

source/tmp/run.ceylon:1: error: incompatible types

Anything a = (print)("");
                    ^

required: Object found: void

Found while investigating ceylon/ceylon-spec#1456.

As always, generated code, @noanno’d.

lucaswerkmeister commented 8 years ago

Here’s the generated code for the unwrapped version: gist.

The compiler generates a let expression returning null.

jvasileff commented 8 years ago

Perhaps somewhat related to https://github.com/ceylon/ceylon-compiler/issues/2387