-
Couldn't load subscription status.
- Fork 160
Avoid dodgy cast in InferenceContext18.solve() #4522
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| /******************************************************************************* | ||
| * Copyright (c) 2025 Groq Inc. and others. | ||
| * | ||
| * This program and the accompanying materials | ||
| * are made available under the terms of the Eclipse Public License 2.0 | ||
| * which accompanies this distribution, and is available at | ||
| * https://www.eclipse.org/legal/epl-2.0/ | ||
| * | ||
| * SPDX-License-Identifier: EPL-2.0 | ||
| * | ||
| * Contributors: | ||
| * Martin Bazley - initial API and implementation | ||
| *******************************************************************************/ | ||
| package org.eclipse.jdt.internal.compiler.ast; | ||
|
|
||
| public interface Location { | ||
| int sourceEnd(); | ||
| int sourceStart(); | ||
| default int nameSourceStart() { return sourceStart(); } | ||
| default int nameSourceEnd() { return sourceEnd(); } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -765,7 +765,7 @@ ImportBinding[] getDefaultImports() { | |
| problemReporter().isClassPathCorrect( | ||
| TypeConstants.JAVA_LANG_OBJECT, | ||
| this.referenceContext, | ||
| this.environment.missingClassFileLocation, false, null/*resolving j.l.O is not specific to any referencing type*/); | ||
| this.environment, false, null/*resolving j.l.O is not specific to any referencing type*/); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this change looks unmotivated to me. Wouldn't just changing the signature of |
||
| BinaryTypeBinding missingObject = this.environment.createMissingType(null, TypeConstants.JAVA_LANG_OBJECT); | ||
| importBinding = missingObject.fPackage; | ||
| implicitImports[0] = new ImportBinding(TypeConstants.JAVA_LANG, true, importBinding, null); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see much benefit in declaring nameSourceStart()/End() here. Those don't seem to be useful for ASTNode and many of its subclasses. Nor do I see this called via the Location interface. Am I missing anything?