You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Presently, map.table is default initialized, but it is running into issue #15929. A suggested workaround was to instead declare it as:
var table =new chpl__hashtable(keyType, valType);
However, after changing it to the above, some cases of maps of classes fail with internal compiler errors. Failures include building mason, and test/library/standard/Map/testBorrowedMap.chpl. I attempted to tease this error apart from map, but was unsuccessful.
The errors are along the lines of:
$CHPL_HOME/modules/standard/Map.chpl:74: internal error: invalid attempt to get reference type [AST/primitive.cpp:235]
The text was updated successfully, but these errors were encountered:
From #15929 (comment) - Here it looks like the problem is that the compiler is trying to resolve PRIM_ADDR_OF with a chpl__hashtable variable that has generic type
use ChapelHashtable;
record mmap {
type keyType;
type valType;
pragma"no doc"var table =new chpl__hashtable(keyType, valType);
procmethod() {
for slot in table.allSlots() { }
}
}
class C {
var i:int;
}
var m: mmap(int, borrowed C);
m.method();
Presently,
map.table
is default initialized, but it is running into issue #15929. A suggested workaround was to instead declare it as:However, after changing it to the above, some cases of maps of classes fail with internal compiler errors. Failures include building
mason
, andtest/library/standard/Map/testBorrowedMap.chpl
. I attempted to tease this error apart frommap
, but was unsuccessful.The errors are along the lines of:
The text was updated successfully, but these errors were encountered: