void (String[] args) { Extractor<String, Integer> e0 = s -> s.equals("1") ? Option.option(1) : Option.none(); Extractor<String, Integer> e = s -> { if (s.equals("1")) { return Option.option(1); } else { return Option.none(); } }; Extractor<String, Integer> e1 = s -> { if (s.equals("1")) { return Option.option(1); } else { return <error descr="Incompatible types. Found: 'Test1.Option<java.lang.String>', required: 'Test1.Option<java.lang.Integer>'">Option.option("2");</error> } }; }