@Override public boolean isCastCompatible(ITypeBinding type) { try { Scope scope = this.resolver.scope(); if (scope == null) return false; if (!(type instanceof TypeBinding)) return false; org.eclipse.jdt.internal.compiler.lookup.TypeBinding expressionType = ((TypeBinding) type).binding; // simulate capture in case checked binding did not properly get extracted from a reference expressionType = expressionType.capture(scope, 0, 0); return TypeBinding.EXPRESSION.checkCastTypesCompatibility(scope, this.binding, expressionType, null); } catch (AbortCompilation e) { // don't surface internal exception to clients // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=143013 return false; } }
public boolean isCastCompatible(ITypeBinding type) { try { Scope scope = this.resolver.scope(); if (scope == null) return false; if (!(type instanceof TypeBinding)) return false; org.eclipse.jdt.internal.compiler.lookup.TypeBinding expressionType = ((TypeBinding) type).binding; // simulate capture in case checked binding did not properly get extracted from a reference expressionType = expressionType.capture(scope, 0, 0); return TypeBinding.EXPRESSION.checkCastTypesCompatibility(scope, this.binding, expressionType, null); } catch (AbortCompilation e) { // don't surface internal exception to clients // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=143013 return false; } }
public boolean isCastCompatible(ITypeBinding type) { try { Scope scope = this.resolver.scope(); if (scope == null) return false; if (!(type instanceof TypeBinding)) return false; org.eclipse.jdt.internal.compiler.lookup.TypeBinding expressionType = ((TypeBinding) type).binding; // simulate capture in case checked binding did not properly get extracted from a reference expressionType = expressionType.capture(scope, 0, 0); return TypeBinding.EXPRESSION.checkCastTypesCompatibility(scope, this.binding, expressionType, null); } catch (AbortCompilation e) { // don't surface internal exception to clients // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=143013 return false; } }
public boolean isCastCompatible(ITypeBinding type) { try { Scope scope = this.resolver.scope(); if (scope == null) return false; if (!(type instanceof TypeBinding)) return false; org.eclipse.jdt.internal.compiler.lookup.TypeBinding expressionType = ((TypeBinding) type).binding; // simulate capture in case checked binding did not properly get extracted from a reference expressionType = expressionType.capture(scope, 0); return TypeBinding.EXPRESSION.checkCastTypesCompatibility(scope, this.binding, expressionType, null); } catch (AbortCompilation e) { // don't surface internal exception to clients // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=143013 return false; } }
public boolean isCastCompatible(ITypeBinding type) { try { Scope scope = this.resolver.scope(); if (scope == null) return false; if (!(type instanceof TypeBinding)) return false; org.eclipse.jdt.internal.compiler.lookup.TypeBinding expressionType = ((TypeBinding) type).binding; // simulate capture in case checked binding did not properly get extracted from a reference expressionType = expressionType.capture(scope, 0); return TypeBinding.EXPRESSION.checkCastTypesCompatibility(scope, this.binding, expressionType, null); } catch (AbortCompilation e) { // don't surface internal exception to clients // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=143013 return false; } }
public boolean isCastCompatible(ITypeBinding type) { try { Scope scope = this.resolver.scope(); if (scope == null) return false; if (!(type instanceof TypeBinding)) return false; org.eclipse.jdt.internal.compiler.lookup.TypeBinding expressionType = ((TypeBinding) type).binding; // simulate capture in case checked binding did not properly get extracted from a reference expressionType = expressionType.capture(scope, 0); return TypeBinding.EXPRESSION.checkCastTypesCompatibility(scope, this.binding, expressionType, null); } catch (AbortCompilation e) { // don't surface internal exception to clients // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=143013 return false; } }