chapel-lang/chapel

Bug with `isPOD` and generic record types

Open

#24.172 aperta il 9 gen 2024

Vedi su GitHub
 (6 commenti) (0 reazioni) (0 assegnatari)Chapel (446 fork)auto 404
area: Compilergood first issuetype: Bug

Metriche repository

Star
 (2010 star)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

use Types;

record r { type T; var x: T; }

proc main() {
  writeln(isPOD(r(?)));
}
Foo.chpl:3: error: cannot default-initialize a variable with generic type
Note: This source location is a guess.
note: '<temporary>' has generic type 'r'
note: cannot find initialization point to split-init this variable

In the debugger I can see that it's referring to the auto-generated deinit which has its resolution triggered by resolveAutoCopyEtc, called from propagateNotPod.

Guida contributor