ajwang / groovypptest

Automatically exported from code.google.com/p/groovypptest
0 stars 0 forks source link

Wrong type control flow for ternary operators #387

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
def foo(def o) {
  def newValue = o instanceof String ? o : ((File) o).name
}
----
doesn't compile:
Cannot convert String to File

Original issue reported on code.google.com by gromop...@gmail.com on 7 Jul 2011 at 8:12