Skip to content

Commit defa979

Browse files
committed
Add: a few minor changes;
Fix: a recent typo;
1 parent 83d83ad commit defa979

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

demo/hello.dao

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ io.write( "Hello Dao!\n" #{ comment inside codes #} );
55
Here are multi-lines comments.
66
Here are multi-lines comments.
77
#}
8-
io.writef( "\nThis version is %s.\n", std.version(1) )
8+
io.writef( "\nThis version is %s.\n", std.version(true) )

demo/interface.dao

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ interface AA
55
routine[]( index : int )=>int;
66
routine.name()=>string;
77

8-
routine for( iter : for_iterator );
9-
routine[]( iter : for_iterator )=>int;
8+
routine for( iter : ForIterator );
9+
routine[]( iter : ForIterator )=>int;
1010
}
1111
routine Test( o : AA )
1212
{
@@ -23,11 +23,11 @@ class BB
2323
routine[]( index : int ){ return index }
2424
routine.name(){ return "BB" }
2525

26-
routine for( iter : for_iterator ){
26+
routine for( iter : ForIterator ){
2727
iter.valid = 1;
2828
iter.iterator = 0;
2929
}
30-
routine[]( iter : for_iterator ){
30+
routine[]( iter : ForIterator ){
3131
id = (int)iter.iterator;
3232
iter.valid = id + 1 < 5;
3333
iter.iterator = id + 1;

kernel/daoOptimizer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6069,7 +6069,7 @@ int DaoInferencer_DoInference( DaoInferencer *self )
60696069
if( data->type == DAO_NONE ) goto NotPermit;
60706070
if( data->xBase.subtype == DAO_OBJECT_VARIABLE && at->tid ==DAO_CLASS ) goto NeedInstVar;
60716071
if( data->type != DAO_CONSTANT || data->xConst.value->type != DAO_ROUTINE ) goto NotMatch;
6072-
meth = (DaoRoutine*) value;
6072+
meth = (DaoRoutine*) value->xConst.value;
60736073
break;
60746074
case DAO_INTERFACE :
60756075
node = DMap_Find( at->aux->xInterface.methods, mbs );

0 commit comments

Comments
 (0)