xls icon indicating copy to clipboard operation
xls copied to clipboard

Improve error messaging of undefined parametric bindings.

Open hongted opened this issue 3 years ago • 0 comments

The error message from parsing the following DSLX code:

import std                                                                      

const A = u32:2;                                                                

pub fn plus<B: u32>(in0: u32) -> u32 {
  in0 + B
}

pub fn plus_two(in0 : u32) -> u32 {
  plus<a>(in0)
}

is

0009: pub fn plus_two(in0 : u32) -> u32 {
0010:   plus<a>(in0)
~~~~~~~~~~~~^^ ParseError: Expected '}', got '<'
0011: }

Ideally it would be something along the lines that 'a' is not defined.

hongted avatar Aug 17 '22 00:08 hongted