My favorites | Sign in
Project Home Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 93: problems with NULL<T>
1 person starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  ----
Closed:  Jan 2011


 
Reported by michaelbaczynski@gmail.com, Jan 21, 2011
using latest haXe/hxcpp version from svn, compilation fails with:
./src/B.cpp(46) : error C2065: '_NULL' : undeclared identifier
./src/B.cpp(38) : error C2082: redefinition of formal parameter '_NULL'

this worked in a former release, so I guess something is broken.

class A<T>
{
    public var val:T;
    public function new() {}
}

class B<T>
{
    public function new()
    {
    }
    
    inline public function foo1():T
    {
        return foo2();
    }
    
    inline function foo2():T
    {
        var a = new A();
        
        var NULL:Null<T> = null;
        a.val = NULL; //this is needed for flash target (can't assign null to int)...
        
        return a.val;
    }
}

class Main
{
    static function main()
    {
        B;
    }
}
Jan 21, 2011
Project Member #1 gameh...@gmail.com
Fixed - thanks for reporting.  The issue is actually with the name of the local variable "NULL".
Status: Fixed

Powered by Google Project Hosting