Vass,
Yep, that should have a rank. My mistake.
Unfortunately, Im not sure how that got removed from the code, and I dont
have any versions of my code that has the issue.

I'll try to figure out what I was doing there, and come back with something
that makes sense.

-Ian J. Bertolacci

On Thu, Sep 24, 2015 at 3:56 PM, Vassily Litvinov <[email protected]> wrote:

> Ian,
>
> Apologies for delayed response - it was crunch time here to get the
> release out.
>
> I think the compiler complains because domain() requires rank. Why are you
> not wanting to provide the rank? What is the rank that you want your
> 'Domain' to be?
>
> Vass
>
>
> On 09/11/15 12:32, Ian Bertolacci wrote:
>
>> Ive got an odd one here.
>> Ive reduced the bug I'm seeing in an assignment to the most minimal
>> components that still give the error (so dont worry about the function of
>> the code).
>>
>> Compiling the code (which is also attached):
>>
>> class GenericClass {
>>    type eltType ;
>>    // fixed if field Domain removed
>>    // fixed if added rank=1 to domain type 'constructor'
>>      // side effect: broken (same error) if idxType=uint
>>    var Domain : domain(idxType=int); // Compiler complains here: error:
>> unable to resolve type
>> }
>>
>> // fixed if arguments (and type T query) reversed
>> // fixed if procedure removed
>> // fixed if 'object' argument removed
>> // fixed if change to object : GenericClass(?Z), and added where T==Z
>> clause
>> // fixed if primitive is not generically typed, and object type has the
>> type query (?T)
>> // fixed if procedure is not an operator (e.g. foo( primative ... ) )
>> // fixed if operator is %
>> // broken if operator is + * & | (maybe more)
>> proc +( primative : ?T, object : GenericClass(T)  ) : GenericClass(T) {
>>    return new GenericClass( eltType = T );
>> }
>>
>> // fixed if made int
>> var a = new GenericClass( eltType = real );
>>
>> results in the compile time error:
>> test.chpl:6: error: unable to resolve type
>>
>> If any one of the changes from the 'fixed if' comments results in the
>> program compiling with no errors.
>> This doesn't seem correct.
>> Why does eltType affect the domain type?
>> Why would adding rank=? fix the problem (but only for idxType=int)?
>> How does the operator overload involve the resolution of the domain type
>> in
>> GenericClass?
>> Why does changing the order of arguments fix the error?
>>
>> Is there a bug in the code itself (am I doing something wrong) or is there
>> something buggy with the compiler?
>> Using 1.11.0.
>> Note: I do not have the option of using the repository compiler
>>
>> -Ian J. Bertolacci
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>>
>>
>>
>> _______________________________________________
>> Chapel-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/chapel-users
>>
>>
------------------------------------------------------------------------------
_______________________________________________
Chapel-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-users

Reply via email to