1636 boolean useVarargs) { |
1636 boolean useVarargs) { |
1637 Symbol sym = findMethod(env, site, |
1637 Symbol sym = findMethod(env, site, |
1638 names.init, argtypes, |
1638 names.init, argtypes, |
1639 typeargtypes, allowBoxing, |
1639 typeargtypes, allowBoxing, |
1640 useVarargs, false); |
1640 useVarargs, false); |
1641 if ((sym.flags() & DEPRECATED) != 0 && |
1641 chk.checkDeprecated(pos, env.info.scope.owner, sym); |
1642 (env.info.scope.owner.flags() & DEPRECATED) == 0 && |
|
1643 env.info.scope.owner.outermostClass() != sym.outermostClass()) |
|
1644 chk.warnDeprecated(pos, sym); |
|
1645 return sym; |
1642 return sym; |
1646 } |
1643 } |
1647 |
1644 |
1648 /** Resolve a constructor, throw a fatal error if not found. |
1645 /** Resolve a constructor, throw a fatal error if not found. |
1649 * @param pos The position to use for error reporting. |
1646 * @param pos The position to use for error reporting. |