Skip to main content

module lang::flybytes::tests::NoCastCheckTest

rascal-0.40.17
flybytes-0.2.8

Usage

import lang::flybytes::tests::NoCastCheckTest;

Source code

http://github.com/usethesource/flybytes/blob/main/src/lang/flybytes/tests/NoCastCheckTest.rsc

Dependencies

import lang::flybytes::Syntax;
import lang::flybytes::Compiler;
import lang::flybytes::api::Vallang;
import lang::flybytes::api::Object;

function noUpCastTestClass

Class noUpCastTestClass()

function testCastClass

bool testCastClass(Class c)

function noDownCastTestClass

Class noDownCastTestClass()

Tests

test upcastTest

test bool upcastTest() = testCastClass(noUpCastTestClass());

test downcastTest

test bool downcastTest() = testCastClass(noDownCastTestClass());