View | Details | Raw Unified | Return to bug 184957 | Differences between
and this patch

Collapse All | Expand All

(-)compiler/org/eclipse/jdt/internal/compiler/ast/AllocationExpression.java (-2 / +16 lines)
Lines 84-90 Link Here
84
	ReferenceBinding allocatedType = this.codegenBinding.declaringClass;
84
	ReferenceBinding allocatedType = this.codegenBinding.declaringClass;
85
85
86
	codeStream.new_(allocatedType);
86
	codeStream.new_(allocatedType);
87
	if (valueRequired) {
87
	if (valueRequired || (implicitConversion & TypeIds.UNBOXING) != 0) {
88
		codeStream.dup();
88
		codeStream.dup();
89
	}
89
	}
90
	// better highlight for allocation: display the type individually
90
	// better highlight for allocation: display the type individually
Lines 126-132 Link Here
126
		}
126
		}
127
		codeStream.invokespecial(syntheticAccessor);
127
		codeStream.invokespecial(syntheticAccessor);
128
	}
128
	}
129
	codeStream.generateImplicitConversion(this.implicitConversion);
129
	if (valueRequired) {
130
		codeStream.generateImplicitConversion(implicitConversion);
131
	} else {
132
		boolean isUnboxing = (implicitConversion & TypeIds.UNBOXING) != 0;
133
		// conversion only generated if unboxing
134
		if (isUnboxing) codeStream.generateImplicitConversion(implicitConversion);
135
		switch (isUnboxing ? postConversionType(currentScope).id : this.resolvedType.id) {
136
			case T_long :
137
			case T_double :
138
				codeStream.pop2();
139
				break;
140
			default :
141
				codeStream.pop();
142
		}
143
	}
130
	codeStream.recordPositionsFrom(pc, this.sourceStart);
144
	codeStream.recordPositionsFrom(pc, this.sourceStart);
131
}
145
}
132
146

Return to bug 184957