Skip to content

Regent type mismatch error sometimes reports matching types #491

Description

@TWarszawski

Sometimes the Regent compiler gives type mismatch errors where it reports two identical types. The example program below results in the error message: "type mismatch in assignment: expected region(ispace(int1d), int32) but got region(ispace(int1d), int32)". I've had several questions about similar examples from students during cs315b, and also since the class ended from those continuing to work with Regent. I believe one of those examples was due to a struct or field space being both imported and defined. I think that it could help alleviate confusion to give a more informative error message.

import "regent"
local c = regentlib.c
struct AStruct {
  ptr : region(ispace(int1d), int32),
}
task test(x : AStruct)
  x.ptr = region(ispace(int1d,100), int32)
end

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

RegentIssues pertaining to RegentbacklogFeature/fix that is desirable, but not currently plannedenhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions