You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DartBot opened this issue
May 21, 2014
· 4 comments
Assignees
Labels
area-vmUse area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends.P1A high priority bug; for example, a single project is unusable or has many test failures
What is the expected output? What do you see instead?
It should give a syntax error or prevent the program from running due to the annotation not being a constant on line 25.
What version of the product are you using? On what operating system?
64-bit DartVM 1.3.6, Linux 64-bit in VirtualBox
Please provide any additional information below.
When running dartanalyzer on the above code, an error is found that reads:
[error] Annotation can be only constant variable or constant constructor invocation (/home/austin/workspace/ddb/test/expando_test.dart, line 25, col 1)
DartBot
added
Type-Defect
P1
A high priority bug; for example, a single project is unusable or has many test failures
area-vm
Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends.
labels
May 22, 2014
area-vmUse area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends.P1A high priority bug; for example, a single project is unusable or has many test failures
This issue was originally filed by @austincummings
What steps will reproduce the problem?
Run the follow code in the 64bit linux Dart VM.
import 'dart:mirrors';
class Todo {
final String owner;
final String task;
final String dueDate;
const Todo([this.owner, this.task, this.dueDate]);
}
checkTodos() {
reflect(main).function.metadata.forEach((meta) {
var owner = meta.reflectee.owner;
var task = meta.reflectee.task;
var dueDate = DateTime.parse(meta.reflectee.dueDate);
if (dueDate.compareTo(new DateTime.now()) < 0) {
throw "$task is not done yet. Blame $owner.";
}
});
}
get todo => const Todo();
// @Todo('austincummings', 'This this this', '2020-01-01')
@todo
void main() {
checkTodos();
}
What is the expected output? What do you see instead?
It should give a syntax error or prevent the program from running due to the annotation not being a constant on line 25.
What version of the product are you using? On what operating system?
64-bit DartVM 1.3.6, Linux 64-bit in VirtualBox
Please provide any additional information below.
When running dartanalyzer on the above code, an error is found that reads:
[error] Annotation can be only constant variable or constant constructor invocation (/home/austin/workspace/ddb/test/expando_test.dart, line 25, col 1)
Attachment:
expando_test.dart (642 Bytes)
The text was updated successfully, but these errors were encountered: