mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-24 20:21:48 +00:00
Runtime 'none' by default
This commit is contained in:
@ -2890,7 +2890,7 @@ export class Compiler extends DiagnosticEmitter {
|
||||
assert(!expression.toType);
|
||||
let expr = this.compileExpressionRetainType(expression.expression, contextualType, WrapMode.NONE);
|
||||
let type = this.currentType;
|
||||
if (!type.is(TypeFlags.NULLABLE | TypeFlags.REFERENCE)) {
|
||||
if (!type.is(TypeFlags.NULLABLE | TypeFlags.REFERENCE) || this.currentFlow.isNonnull(type, expr)) {
|
||||
this.info(
|
||||
DiagnosticCode.Expression_is_never_null,
|
||||
expression.expression.range
|
||||
|
Reference in New Issue
Block a user