Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6381837
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:26:43+00:00 2026-05-25T02:26:43+00:00

I have the following working code : var routes = []; Eclipse validator for

  • 0

I have the following working code :

var routes = [];

Eclipse validator for javascript prints the following warning :

Type mismatch: cannot convert from any[] to any

What is wrong with my empty array ?

Edit : the warning disappeared later. Apparently Eclipse was wrong and the question needs to be closed. Sorry about that.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T02:26:44+00:00Added an answer on May 25, 2026 at 2:26 am

    Your JavaScript is valid, the problem is with JSDT plugin for Eclipse. In the latest version they introduced a type verification which is problematic in many situations – not only for empty arrays (like in your case). Another typical case may look like this: a = b || c;
    The plugin will complain when b and c are of different types (which is absolutely valid code for JavaScript). There is several bugs already reported to JSDT developers about this problem, but the issues are not fixed yet.

    Unfortunately currently it is not possible to switch off the type verification using JSDT configuration screen in Eclipse. I switched it off directly from the JSDT source code. To do this, please follow these steps:

    1. Download the JSDT source code from Eclipse WebTools Project
    2. Open the org.eclipse.wst.jsdt.debug.core project with Eclipse. Make sure you have Eclipse SDK installed. It might also be required to adjust some dependencies in the plugin.xml file.
    3. The type verification is located in computeSeverity method of ProblemReporter class.
    4. To switch off type verification replace the line: case IProblem.TypeMismatch: return ProblemSeverities.Warning; with case IProblem.TypeMismatch: return ProblemSeverities.Ignore;
    5. Build the project and close Eclipse.
    6. In Eclipse folder find the file named org.eclipse.wst.jsdt.core<version>.jar – make a safe copy of it, then open the jar file and replace the ProblemReporter.class file with the one you compiled in the step 5 (the file is in bin folder of your project).
    7. Start Eclipse and clean your JavaScript project. All type checking will be ignored by JSDT.

    Important! Make sure you’ve downloaded the same version of JSDT that you are using in Eclipse. Eventually instead of replacing a single file you can replace the entire plugin.

    If you don’t want to download and compile the plugin by yourself you can try with my fixed version. I’ve placed it on my FunctionSack webpage. I am using Eclipse 3.7 (Indigo) with JSDT 1.3.0, so make sure you have similar configuration if you want to use my file.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following Clojure code and I'm not sure why it's not working:
I am working with ASP.NET doing some client side javascript. I have the following
I have the following code working fine but the problem is that it always
Ok, firstly I have the following code working.. although my question is this; should
I have the following code var input = $('#el_id'); wrapper = $(document.createElement('div')); wrapper.addClass('small'); wrapper.css('width',200);
I have the following code: var numberOfSelectedOptions = new Array(); numberOfSelectedOptions[0]=0; numberOfSelectedOptions[1]=0; numberOfSelectedOptions[2]=0; $(a.tagvariantoption).live(click,
I have the following HTML code: <td> <input type=text size=40 value= name=related_image id=related_image> <input
I have the following JS code for ZeroClipBoard : onComplete: function(item) { var text=
I have the following block of code in a jQTouch app I'm working on:
In tcsh , I have the following script working: #!/bin/tcsh setenv X_ROOT /some/specified/path setenv

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.