Skip to content

frog handling null incorrectly #595

Closed
@dgrove

Description

@dgrove

svn r1844

There are a variety of cases where frog is handling null incorrectly. A few examples are below:

f() => null;

main() {
print (~f());
}


f() => null;

main() {
print(f());
}


running the VM produces an error in both cases:

NullPointerException
 0. Function: 'Object.noSuchMethod' url: 'bootstrap' line:315 col:3
 1. Function: '::.main' url: '/Users/dgrove/repo/dart-bleeding/dart/frog/y.dart' line:4 col:7

running frog produces "0" in both cases.

Another example:

f() => null;

main() {
print(f() + 7);
}

frog produces "7", the VM throws an exception.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1A high priority bug; for example, a single project is unusable or has many test failures

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions