PR c++/89831 - error with qualified-id in const member function.
authorJason Merrill <jason@redhat.com>
Wed, 27 Mar 2019 20:39:19 +0000 (16:39 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 27 Mar 2019 20:39:19 +0000 (16:39 -0400)
commitdd03c093bcc932fa7ec09e2f0e5662f6d8f429db
tree251e708b448eecbb80af1b26733466be5475b1e3
parentfad170232ce3b8c7a7743cc5a6031932257c9720
PR c++/89831 - error with qualified-id in const member function.

Since the fix for 15272 we were remembering the wrong function to use at
instantiation time, because the type of the SCOPE_REF didn't reflect the
cv-quals of 'this'.  Conveniently, we can fix this by simplifying the code.

* semantics.c (finish_non_static_data_member): Use object cv-quals
in scoped case, too.

From-SVN: r269977
gcc/cp/ChangeLog
gcc/cp/semantics.c
gcc/testsuite/g++.dg/template/scope6.C [new file with mode: 0644]