In emacs -Q:

    M-: (setq lexical-binding t)

paste the following:

    (funcall
     (let ((a 5))
       (lambda ()
         a)))

M-x eval-buffer
The error (void-variable a) will be thrown.

The snippet will be evaluated correctly, only if one inserts 

    ;; -*- lexical-binding:t -*-

on the first line