env.newBoundVar(tree.pos, tree.symbol(), getConstrType(tree.type), header);
env.newBoundVar( tree.pos, tree.symbol(), getConstrType(tree.type), header.selector);
    protected PatternNode patternNode(Tree tree, Header header, CaseEnv env) {        switch (tree) {            case Apply(Tree fn, Tree[] args):             // pattern with args                if (args.length == 1)                    switch (args[0]) {                        case Tuple(Tree[] ts):                            return makeSequencePat(tree.pos, tree.type, ts.length);                    }                return makeConstrPat(tree.pos, getConstrType(tree.type));            case Typed(Ident(Name name), Tree tpe):       // variable pattern                if ((env != null) && (name != WILDCARD_N))                    env.newBoundVar(tree.pos, ((Tree.Typed)tree).expr.symbol(), getConstrType(tpe.type), header);                if (header.type.isSubType(getConstrType(tpe.type)))                    return makeDefaultPat(tree.pos, getConstrType(tpe.type));                else                    return makeConstrPat(tree.pos, getConstrType(tpe.type));            case Ident(Name name):        // pattern without args or variable                if (tree.symbol().isPrimaryConstructor())                    return makeConstrPat(tree.pos, getConstrType(tree.type));                else if (name.isVariable()) {                    if ((env != null) && (name != WILDCARD_N))                        env.newBoundVar(tree.pos, tree.symbol(), getConstrType(tree.type), header);                    return makeDefaultPat(tree.pos, getConstrType(header.type));                } else                    return makeVariablePat(tree.pos, tree);            case Select(_, Name name):                                    // variable                if (tree.symbol().isPrimaryConstructor())                    return makeConstrPat(tree.pos, getConstrType(tree.type));                else                    return makeVariablePat(tree.pos, tree);            case Literal(Object value):                return makeConstantPat(tree.pos, getConstrType(tree.type), value);            default:                new scalac.ast.printer.TextTreePrinter().print(tree).flush();                throw new ApplicationError(tree);        }    }