Problem with unnamed script

file script.C

{
  Int_t a = 1;
}
$ root script.C
root [0] 
Processing script.C...
root [1] a
(Int_t) 1

and now modified file script.C

// any comment

{
  Int_t a = 1;
}
$ root script.C
root [0] 
Processing script.C...
root [1] a
input_line_11:2:3: error: use of undeclared identifier 'a'
 (a)
  ^

This is BUG or feature in CLING ? (tested under today root trunk version)
Thanks, Jan

Hi Jan,

That’s a BUG. I have created sft.its.cern.ch/jira/browse/ROOT-7834

Which platform do you use?

Thanks for reporting!

Axel.

info added in JIRA

Thank you, Jan!

Axel.