| Index: pkg/compiler/lib/src/resolution/members.dart
|
| diff --git a/pkg/compiler/lib/src/resolution/members.dart b/pkg/compiler/lib/src/resolution/members.dart
|
| index 91c47871288a2a267d088d53784b8d83d88882a4..1630f52f0e75a20a317a189bfba2bf8566ba89d4 100644
|
| --- a/pkg/compiler/lib/src/resolution/members.dart
|
| +++ b/pkg/compiler/lib/src/resolution/members.dart
|
| @@ -1960,8 +1960,7 @@ class TypeResolver {
|
| outer != null && outer.isFactoryConstructor;
|
| if (!outer.isClass &&
|
| !outer.isTypedef &&
|
| - !isInFactoryConstructor &&
|
| - Elements.isInStaticContext(visitor.enclosingElement)) {
|
| + !Elements.hasAccessToTypeVariables(visitor.enclosingElement)) {
|
| registry.registerThrowRuntimeError();
|
| type = reportFailureAndCreateType(
|
| MessageKind.TYPE_VARIABLE_WITHIN_STATIC_MEMBER,
|
| @@ -2841,7 +2840,7 @@ class ResolverVisitor extends MappingVisitor<ResolutionResult> {
|
| } else if (target.isTypeVariable) {
|
| ClassElement cls = target.enclosingClass;
|
| assert(enclosingElement.enclosingClass == cls);
|
| - if (Elements.isInStaticContext(enclosingElement)) {
|
| + if (!Elements.hasAccessToTypeVariables(enclosingElement)) {
|
| compiler.reportError(node,
|
| MessageKind.TYPE_VARIABLE_WITHIN_STATIC_MEMBER,
|
| {'typeVariableName': node.selector});
|
|
|