This repository was archived by the owner on Apr 12, 2026. It is now read-only.
Description This module definition:
generic module ModuleM (typedef value_type @integer(), value_type value)
generates the following error for any integer type:
nesc1 : cval.c:255: cval_uint_value: Assertion `0' failed.
nesC : Internal error.
in nesc 1.3.5
I believe this kind of module definition should be perfectly safe and sound and should not generate a compile error.
Sample code to reproduce the error:
Custom interface:
interface Test<t>
{
command bool test (t value);
}
Custom module that uses the interface:
generic module ModuleM (typedef value_type @integer(), value_type value)
{
provides interface Test<value_type>;
}
implementation
{
command bool Test.test (value_type val)
{
return val == value;
}
}
Test application configuration:
configuration TestAppC{}
implementation {
components TestC, MainC, new ModuleM (uint8_t , 42 );
MainC.Boot <- TestC;
TestC.Test -> ModuleM;
}
Test application itself:
module TestC
{
uses interface Test<uint8_t >;
uses interface Boot;
}
implementation
{
event void Boot.booted () {
call Test.test (42 );
}
}Reactions are currently unavailable
This module definition:
generates the following error for any integer type:
in nesc 1.3.5
I believe this kind of module definition should be perfectly safe and sound and should not generate a compile error.
Sample code to reproduce the error:
Custom interface:
Custom module that uses the interface:
Test application configuration:
Test application itself: