Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualWipe

Posted 17 February 2013 - 01:36 PM

So first thing is: cannot use array<> inside namespace; using [] works just fine

 

 

namespace nsTest
{
    array<int> arrgh;
};

Result: "Identifier 'array' is not a data type"

 

Second thing found when trying to put one of  our modules inside namespace; either it's me failing in reading docs smile.png, or AS in implementing them. Anyway, code is something like this:

 

// file1
namespace nsTestTwo {
    shared interface nsIface
    {
        nsIface@ parent { get; }
    }
}

// file2
namespace nsTestTwo {
    class nsClass : nsIface
    {
        nsIface@ mommy;
        
        nsClass( nsIface@ parent )
        {
            @this.mommy = parent;
        }
        
        nsIface@ get_parent()
        {
            return( @this.mommy );
        }
    }
}

Fails to compile as well, "Identifier 'nsIface' is not a data type", same thing when i add any func returning nsIface@ to namespace above. If i get rid of namespace only, leaving everything in global scope, everything starts to work. Checked with r1558.

 

EDIT:

Small correction: "file1" is supposed to be used as a header file for other modules.


#3Wipe

Posted 17 February 2013 - 12:58 PM

So first thing is: cannot use array<> inside namespace; using [] works just fine

 

 

namespace nsTest
{
    array<int> arrgh;
};

Result: "Identifier 'array' is not a data type"

 

Second thing found when trying to put one of  our modules inside namespace; either it's me failing in reading docs smile.png, or AS in implementing them. Anyway, code is something like this:

 

// file1
namespace nsTestTwo {
    shared interface nsIface
    {
        nsIface@ parent { get; }
    }
}

// file2
namespace nsTestTwo {
    class nsClass : nsIface
    {
        nsIface@ mommy;
        
        nsClass( nsIface@ parent )
        {
            @this.mommy = parent;
        }
        
        nsIface@ get_parent()
        {
            return( @this.mommy );
        }
    }
}

Fails to compile as well, "Identifier 'nsIface' is not a data type", same thing when i add any func returning nsIface@ to namespace above. If i get rid of namespace only, leaving everything in global scope, everything starts to work. Checked with r1558.


#2Wipe

Posted 17 February 2013 - 12:57 PM

So first thing is: cannot use array<> inside namespace; using [] works just fine

 

 

namespace nsTest
{
    array<int> arrgh;
};

Result: "Identifier 'array' is not a data type"

 

Second thing found when trying to put one of  our modules inside namespace; either it's me failing in reading docs smile.png, or AS in implementing them. Anyway, code is something like this:

 

// file1
namespace nsTestTwo {
    shared interface nsIface
    {
        nsIface@ parent { get; }
    }
}

// file2
namespace nsTestTwo {
    class nsClass : nsIface
    {
        nsIface@ mommy;
        
        nsClass( nsIface@ parent )
        {
            @this.mommy = parent;
        }
        
        nsIface@ get_parent()
        {
            return( @this.mommy );
        }
    }
    
    nsIface@ nsMommy()
    {
        nsClass@ p = nsClass( null );
        nsClass@ c = nsClass( p );
        return( @c );
    }
}

Fails to compile as well, "Identifier 'nsIface' is not a data type", same thing when i add any func returning nsIface@ to namespace above. If i get rid of namespace only, leaving everything in global scope, everything starts to work. Checked with r1558.


#1Wipe

Posted 17 February 2013 - 12:57 PM

So first thing is: cannot use array<> inside namespace; using [] works just fine

 

namespace nsTest
{
    array<int> arrgh;
};

Result: "Identifier 'array' is not a data type"

 

Second thing found when trying to put one of  our modules inside namespace; either it's me failing in reading docs smile.png, or AS in implementing them. Anyway, code is something like this:

// file1
namespace nsTestTwo {
    shared interface nsIface
    {
        nsIface@ parent { get; }
    }
}

// file2
namespace nsTestTwo {
    class nsClass : nsIface
    {
        nsIface@ mommy;
        
        nsClass( nsIface@ parent )
        {
            @this.mommy = parent;
        }
        
        nsIface@ get_parent()
        {
            return( @this.mommy );
        }
    }
    
    nsIface@ nsMommy()
    {
        nsClass@ p = nsClass( null );
        nsClass@ c = nsClass( p );
        return( @c );
    }
}

Fails to compile as well, "Identifier 'nsIface' is not a data type", same thing when i add any func returning nsIface to namespace above. If i get rid of namespace only, leaving everything in global scope, everything starts to work. Checked with r1558.


PARTNERS