We cannot forward declare a function inside a function.
This commit is contained in:
parent
a9b71bb973
commit
ffa77e6521
@ -25,10 +25,10 @@ Result // CHECK: (cling::StoredValueRef) boxes [(cling::StoredValueRef &) &0x{{.
|
||||
V // CHECK: (cling::StoredValueRef) boxes [(int *) 0x12]
|
||||
|
||||
// Savannah #96277
|
||||
gCling->evaluate("double sin(double); double one = sin(3.141/2);", V);
|
||||
gCling->evaluate("gCling->declare(\"double sin(double);\"); double one = sin(3.141/2);", V);
|
||||
V // CHECK: (cling::StoredValueRef) boxes [(double) 1.000000e+00]
|
||||
|
||||
gCling->process("double sin(double); double one = sin(3.141/2);", &V);
|
||||
gCling->process("double one = sin(3.141/2);", &V);
|
||||
V // CHECK: (cling::StoredValueRef) boxes [(double) 1.000000e+00]
|
||||
one // CHECK: (double) 1.000
|
||||
int one; // expected-error {{redefinition of 'one' with a different type: 'int' vs 'double'}} expected-note {{previous definition is here}}
|
||||
|
Loading…
x
Reference in New Issue
Block a user