Skip to content

Instantly share code, notes, and snippets.

@astatide
Created March 27, 2019 20:06
Show Gist options
  • Select an option

  • Save astatide/88328466fdfaeef89fdaea8dba85f2a0 to your computer and use it in GitHub Desktop.

Select an option

Save astatide/88328466fdfaeef89fdaea8dba85f2a0 to your computer and use it in GitHub Desktop.
Chapel Compiler Error
use IO; // yes, I am aware I don't explicitly need this.
var logFiles: domain(string);
var fileHandles: [logFiles] file;
var testFile: string = 'failure.failface'; // good name! Guaranteed to be unique.
logFiles.add(testFile);
// I mean, it's perhaps not surprising this fails, but it should likely not
// not result in compiler error.
proc failOnDomain() {
logFiles.length();
}
proc failOnEmptyDomain() {
var newDomain: domain(string);
newDomain.length();
}
proc failOnEmptyNonStringDomain() {
// This is actually fine. It appropriately throws an unresolved call.
var newDomain: domain(int);
newDomain.length();
}
//failOnFile();
//failOnEmptyDomain();
//failOnEmptyNonStringDomain();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment