Open jurahul opened 4 years ago
When this error is generated, the parser has parsed the entire statement and moved to the next statement in the file, so the error generated (in parseElementsLiteralType end up pointing to a line after the line containing the problematic code.
parseElementsLiteralType
For example:
func @test() -> f32 { %cst = constant dense<33.0> : f32 return %cst : f32 }
Flags the return with this error message.
May be we can keep track of the location of the type parsed in the earlier line and use that when printing this error message?
WDYT River?
assigned to @River707
Extended Description
When this error is generated, the parser has parsed the entire statement and moved to the next statement in the file, so the error generated (in
parseElementsLiteralType
end up pointing to a line after the line containing the problematic code.For example:
func @test() -> f32 { %cst = constant dense<33.0> : f32 return %cst : f32 }
Flags the return with this error message.
May be we can keep track of the location of the type parsed in the earlier line and use that when printing this error message?