History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEADEV-30974
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Nikolay Chashnikov
Reporter: Sanjiv Jivan
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
IDEA: Development

support for Enums from JSNI

Created: 04 Oct 08 20:06   Updated: 08 Oct 08 11:34
Component/s: GWT Support
Fix Version/s: Diana 8890

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
Environment: XP

Build: 8,858
Fixed in build: 8,877


 Description  « Hide
The static method call valueOf(..) of enums from JSNI is marked as an error.
package com.test.client;

import com.google.gwt.core.client.EntryPoint;

enum Season {
    WINTER, SPRING, SUMMER, FALL
}

public class Test implements EntryPoint {
    public void onModuleLoad() {
        Season enumVal = Season.valueOf("SPRING");
        Season enumVal2 = getCurrentSearson();
        System.out.println("here");
    }

    public final native Season getCurrentSearson() /*-{
           //this line is marked as an error although its valid
            return @com.test.client.Season::valueOf(Ljava/lang/String;)("WINTER"); 
    }-*/;
}


 All   Comments   Work Log   Change History      Sort Order:
There are no comments yet on this issue.