View unanswered posts | View active topics



Reply to topic  [ 3 posts ] 
Debug: Enum with Class<T> as argument showing up as null 
Author Message
Member

Joined: Tue Mar 08, 2016 10:00 am
Posts: 2
Reply with quote
Hello there!, found this today. Used the search but didnt seem to find anything like it.

* Flashdevelop version ** - 5.1.0
* Version of the Microsoft.NET framework** - 3.5
* Your operating system and service pack - Windows 8.1
* Details how to reproduce the problem - see below
* Exception details from the error log - N/A
Code:
class Base
{
    public function new(){
    }
}

class BaseTwo extends Base
{
    public function new(){
        super();
    }
}

enum EnumType {
    OPEN( baseClass:Class<Base>, data:Dynamic );
}

class Test {
   
    public function doSomething( param1:EnumType )
    {
        switch(param1){
                // FD shows baseclass as null while debugging
                case EnumType.OPEN(baseclass, data):
                   trace(Type.getClassName(baseclass));
                   trace(data);
        }
    }
   
    public function new()
    {
       doSomething(EnumType.OPEN(BaseTwo, { stuff: 1 }));   
    }
   
    static function main() {
        trace("Haxe is great!");
       
        new Test();
    }
}


While debugging in doSomething method inside the switch FD shows baseclass as null although it does have a value.


Tue Mar 08, 2016 10:15 am
Profile
Moderator

Joined: Mon Jul 06, 2009 8:14 am
Posts: 258
Reply with quote
Not happening here, but it's not the first report of a similar thing. Which Haxe version are you using? I'm on a normal 3.2.1 one. Personally I think it's more of a Haxe thing.

Image


Tue Mar 08, 2016 8:08 pm
Profile
Member

Joined: Tue Mar 08, 2016 10:00 am
Posts: 2
Reply with quote
Using 3.2.1 also.

Even more weird today after rebooting the computer it works as it should
It shows everything as it should.


Wed Mar 09, 2016 8:51 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.