Community
Participate
Working Groups
at org.eclipse.wst.jsdt.internal.compiler.ast.EqualExpression.analyseCode(EqualExpression.java:109) at org.eclipse.wst.jsdt.internal.compiler.ast.AND_AND_Expression.analyseCode(AND_AND_Expression.java:61) at org.eclipse.wst.jsdt.internal.compiler.ast.IfStatement.analyseCode(IfStatement.java:70) at org.eclipse.wst.jsdt.internal.compiler.ast.Block.analyseCode(Block.java:48) at org.eclipse.wst.jsdt.internal.compiler.ast.ForStatement.analyseCode(ForStatement.java:146) at org.eclipse.wst.jsdt.internal.compiler.ast.Block.analyseCode(Block.java:48) at org.eclipse.wst.jsdt.internal.compiler.ast.IfStatement.analyseCode(IfStatement.java:91) at org.eclipse.wst.jsdt.internal.compiler.ast.Block.analyseCode(Block.java:48) at org.eclipse.wst.jsdt.internal.compiler.ast.ForInStatement.analyseCode(ForInStatement.java:101) at org.eclipse.wst.jsdt.internal.compiler.ast.Block.analyseCode(Block.java:48) at org.eclipse.wst.jsdt.internal.compiler.ast.IfStatement.analyseCode(IfStatement.java:110) at org.eclipse.wst.jsdt.internal.compiler.ast.MethodDeclaration.analyseCode(MethodDeclaration.java:93) at org.eclipse.wst.jsdt.internal.compiler.ast.AbstractMethodDeclaration.analyseCode(AbstractMethodDeclaration.java:108) at org.eclipse.wst.jsdt.internal.compiler.ast.FunctionExpression.analyseCode(FunctionExpression.java:73) at org.eclipse.wst.jsdt.internal.compiler.ast.ObjectLiteralField.analyseCode(ObjectLiteralField.java:78) at org.eclipse.wst.jsdt.internal.compiler.ast.ObjectLiteral.analyseCode(ObjectLiteral.java:97) at org.eclipse.wst.jsdt.internal.compiler.ast.MessageSend.analyseCode(MessageSend.java:86) at org.eclipse.wst.jsdt.internal.compiler.ast.CompilationUnitDeclaration.analyseCode(CompilationUnitDeclaration.java:155) at org.eclipse.wst.jsdt.internal.compiler.Compiler.process(Compiler.java:589) at org.eclipse.wst.jsdt.internal.compiler.Compiler.compile(Compiler.java:347)
Created attachment 172768 [details] patch If the FieldReference is determined to be a type we should still set its constant field to NotAConstant.
Chris, I'd like to see either a unit test for this or at least an example that triggers it without the patch.
Here is your reproduce code Nitin. I will add as junit as well... var obj = {}; obj.first = {}; obj.first.second = function() {}; obj.first.second.prototype = new Object(); if({} != obj.first.second) { }
Created attachment 173103 [details] patch with junit
Patch checked in.
*** Bug 322139 has been marked as a duplicate of this bug. ***