This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
This issue is a spriritual succesor to 222893 and a sibling to 234453. When we can decide the type in static (and we can, thanks to ASM.JS findings) - why dont we use this information ? In some cases - it works fine (see: ok() function), but in some cases its just plain crazy (see print() or a()) /** * Expected: Boolean * Actual: Number.x * @param {string} x */ function a(x) { return !!x; } /** * Expected: Number * Actual: String * @param {string} y */ function b(y) { return +y; } /** * Expected: Number * Actual: Number|String * @param {string} z */ function c(z) { return z|0; } /** * Expected: String * Actual: String * @param {number} n */ function ok(n) { return ''+n; } /** * Expected: String * Actual: String|window.print.value * @param {string} value */ function print(value) { return value; }
Reproducible Product Version: NetBeans IDE Dev (Build 201402160001) Java: 1.8.0; Java HotSpot(TM) Client VM 25.0-b69 Runtime: Java(TM) SE Runtime Environment 1.8.0-b129 System: Linux version 3.2.0-48-generic-pae running on i386; UTF-8; en_US (nb)
I have fixed all the cases, except the last one. It's caused by something different that the previous cases. I have created new issue #245916. Marking this issue as fixed.
Integrated into 'main-silver', will be available in build *201407250001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/0753d9de88b9 User: Petr Pisl <ppisl@netbeans.org> Log: #241963 - Navigator type casting is wrong or incomplete