Here's my problem:
I'm encountering this weird error where the compiler is for some reason 
telling me that I cannot produce an "asset_hndl" record type because it 
expects a "fpath" type and I gave an "fpath" type.  I'm really baffled by 
this, any help is appreciated.

Here's my code:
assume asset_hndl = [a:vtype] @{ path=fpath, asset_ptr=a, timestamp=usint }
assume fpath = Strptr1
assume path_variable = @{ variable=fpath, mapping=fpath }

fun P ( path: string ) : fpath = "sta#"
fun asset_map_filename ( filename: fpath, pv: !path_variable ) : fpath = 
"sta#"
fun{a:vtype} asset_hndl_new ( path: !fpath, pv: !path_variable ) : 
asset_hndl = "sta#"

implement{a} asset_hndl_new ( path, pv ) = (@{path=asset_map_filename(path, 
pv), asset_ptr=the_null_ptr, timestamp=int_to_usint(0)}:asset_hndl)

Here's the error:
patscc -tcats /home/tmj90/Goldelish-Engine/source/g_asset.dats
/home/tmj90/Goldelish-Engine/source/g_asset.dats: 651(line=28, offs=45) -- 
738(line=28, offs=132): error(3): the dynamic expression cannot be assigned 
the type [S2Eexi(a(8761); ; S2Etyrec(flt0; npf=-1; path=S2Ecst(fpath), 
asset_ptr=S2Evar(a(8761)), timestamp=S2Ecst(usint)))].
/home/tmj90/Goldelish-Engine/source/g_asset.dats: 651(line=28, offs=45) -- 
738(line=28, offs=132): error(3): mismatch of static terms (tyleq):
The actual term is: S2Ecst(fpath)
The needed term is: S2Ecst(fpath)

Let me know if you need any more information.

-- 
You received this message because you are subscribed to the Google Groups 
"ats-lang-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ats-lang-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ats-lang-users/9c6a2031-519d-4ea7-8d45-dd66cb38dc7fn%40googlegroups.com.

Reply via email to