1021 return visit(t.type); |
1021 return visit(t.type); |
1022 } |
1022 } |
1023 }; |
1023 }; |
1024 |
1024 |
1025 /** Check that given modifiers are legal for given symbol and |
1025 /** Check that given modifiers are legal for given symbol and |
1026 * return modifiers together with any implicit modififiers for that symbol. |
1026 * return modifiers together with any implicit modifiers for that symbol. |
1027 * Warning: we can't use flags() here since this method |
1027 * Warning: we can't use flags() here since this method |
1028 * is called during class enter, when flags() would cause a premature |
1028 * is called during class enter, when flags() would cause a premature |
1029 * completion. |
1029 * completion. |
1030 * @param pos Position to be used for error reporting. |
1030 * @param pos Position to be used for error reporting. |
1031 * @param flags The set of modifiers given in a definition. |
1031 * @param flags The set of modifiers given in a definition. |
1067 else { |
1067 else { |
1068 mask = MethodFlags; |
1068 mask = MethodFlags; |
1069 } |
1069 } |
1070 // Imply STRICTFP if owner has STRICTFP set. |
1070 // Imply STRICTFP if owner has STRICTFP set. |
1071 if (((flags|implicit) & Flags.ABSTRACT) == 0) |
1071 if (((flags|implicit) & Flags.ABSTRACT) == 0) |
1072 implicit |= sym.owner.flags_field & STRICTFP; |
1072 implicit |= sym.owner.flags_field & STRICTFP; |
1073 break; |
1073 break; |
1074 case TYP: |
1074 case TYP: |
1075 if (sym.isLocal()) { |
1075 if (sym.isLocal()) { |
1076 mask = LocalClassFlags; |
1076 mask = LocalClassFlags; |
1077 if (sym.name.isEmpty()) { // Anonymous class |
1077 if (sym.name.isEmpty()) { // Anonymous class |