Skip to content

Pure-Haxe interfaces don't work #1

Description

@zeen

The generated Xcode project fails to build (even without actually implementing the interface, just defining it breaks things):

import objc.foundation.NSDictionary;
import ios.ui.UIApplicationMain;
import ios.ui.UIApplicationDelegate;
import ios.ui.UIResponder;
import ios.ui.UIApplication;
import ios.ui.UIWindow;

interface MyInterface {}
class MyClass /*implements MyInterface*/ {
    public function new() { trace("New!"); }
}

class InterfaceTest extends UIResponder implements UIApplicationDelegate {

    public static function test() {
        trace("Before");
        var v = new MyClass();
        trace("After");
    }

    public static function main() { return new UIApplicationMain ( InterfaceTest ); }
    public static function unusedMain(){}
    public var window :UIWindow;
    public function application(application:UIApplication, didFinishLaunchingWithOptions:NSDictionary) :Bool {
        test();
        return true;
    }
    public function applicationDidBecomeActive(application:UIApplication) :Void {}
    public function applicationWillResignActive(application:UIApplication) :Void {}
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions