diff options
| author | Tim Chevalier <chevalier@alum.wellesley.edu> | 2011-06-21 17:56:56 -0700 |
|---|---|---|
| committer | Tim Chevalier <chevalier@alum.wellesley.edu> | 2011-06-21 17:58:49 -0700 |
| commit | 1a6d029b075c2006f6a49c5ca4a062bc2a713cd5 (patch) | |
| tree | 22e1bc98a012a05c100d927ba92d291527f67b8b /src/rustllvm/MachOObjectFile.cpp | |
| parent | efd8ff46477caa89814bd5322619707873441c55 (diff) | |
| download | rust-1a6d029b075c2006f6a49c5ca4a062bc2a713cd5.tar.gz rust-1a6d029b075c2006f6a49c5ca4a062bc2a713cd5.zip | |
Emit a better error message for unbound type parameters in nested functions
This code was causing a bounds check failure:
fn hd[U](&vec[U] v) -> U {
fn hd1(&vec[U] w) -> U {
ret w.(0);
}
ret hd1(v);
}
because in hd1, U was being treated as if it referred to a type
parameter of hd1, rather than referring to the lexically enclosing binding
for U that's part of hd.
I'm actually not sure whether this is a legit program or not. But I wanted
to get rid of the bounds check error, so I assumed that program shouldn't
compile and made it a proper error message.
Diffstat (limited to 'src/rustllvm/MachOObjectFile.cpp')
0 files changed, 0 insertions, 0 deletions
