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
area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)
'file:///.../echo.dart': error: line 21 pos 21: Invalid const object field: Closure: (String) => String from Function 'simpleEcho': static.
print(const Echo().echo("test"));
^
It fails to recognize that simpleEcho is a compile-time constant in initializer list of Echo().
However, if the commented out line is enabled, the simpleEcho function is recognized as constant, even in the following line.
The simpleEcho function is a compile-time function in all cases.
The text was updated successfully, but these errors were encountered:
lrhn
added
area-vm
Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
labels
Aug 26, 2016
FWIW, this was another manifestation of the imperfect implementation of "potentially const values", issue #392. This fix makes it a bit less imperfect :)
area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)
Example:
This program fails with the error:
It fails to recognize that
simpleEcho
is a compile-time constant in initializer list ofEcho()
.However, if the commented out line is enabled, the
simpleEcho
function is recognized as constant, even in the following line.The
simpleEcho
function is a compile-time function in all cases.The text was updated successfully, but these errors were encountered: