diff options
author | Arthur Cohen <arthur.cohen@embecosm.com> | 2022-07-05 18:53:05 +0200 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2022-07-18 17:24:13 +0200 |
commit | d82201be88ce09c92db709573171c869d94b55fd (patch) | |
tree | fc9fb4feb468bbbbca8265420e2b2f67ef1fe5be /gcc/rust/resolve/rust-ast-resolve-expr.cc | |
parent | 6920d2294b3c6f106478fd3decaa511faf3cac84 (diff) | |
download | gcc-d82201be88ce09c92db709573171c869d94b55fd.zip gcc-d82201be88ce09c92db709573171c869d94b55fd.tar.gz gcc-d82201be88ce09c92db709573171c869d94b55fd.tar.bz2 |
resolver: Disambiguate generic args
This removes all the hacks previously introduced to resolve ambiguous
generic args as types, and adds proper disambiguation.
The algorithm is as follows:
is that name referring to a type?
-> disambiguate to a type
is that name referring to a value?
-> disambiguate to a const value
else
-> disambiguate to type
Since types are the default expected behavior, this allows us to report
type errors properly during typechecking.
Diffstat (limited to 'gcc/rust/resolve/rust-ast-resolve-expr.cc')
-rw-r--r-- | gcc/rust/resolve/rust-ast-resolve-expr.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/rust/resolve/rust-ast-resolve-expr.cc b/gcc/rust/resolve/rust-ast-resolve-expr.cc index 2553c85..4cc4e26 100644 --- a/gcc/rust/resolve/rust-ast-resolve-expr.cc +++ b/gcc/rust/resolve/rust-ast-resolve-expr.cc @@ -87,7 +87,7 @@ ResolveExpr::visit (AST::MethodCallExpr &expr) if (expr.get_method_name ().has_generic_args ()) { AST::GenericArgs &args = expr.get_method_name ().get_generic_args (); - ResolveGenericArgs::go (args); + ResolveGenericArgs::go (args, prefix, canonical_prefix); } auto const &in_params = expr.get_params (); |