Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Free Pascal
»
General
(Moderators:
FPK
,
Tomas Hajny
) »
Is this an issue? Generic method + {$M+}
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
Forum Rules
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
« previous
next »
Print
Pages: [
1
]
Author
Topic: Is this an issue? Generic method + {$M+} (Read 666 times)
ALLIGATOR
Sr. Member
Posts: 469
FPC git[main] Lazarus git[main] 💪🐯💪
Is this an issue? Generic method + {$M+}
«
on:
September 15, 2025, 10:19:14 am »
Code: Pascal
[Select]
[+]
[-]
program
app
;
{$ifdef FPC}{$mode delphi}{$endif}
type
{$M+}
TC
=
class
published
procedure
test<T>
;
end
;
{$M-}
procedure
TC
.
test
<T>
;
begin
WriteLn
(
'kek!'
)
;
end
;
begin
end
.
Output:
Code:
[Select]
Error: Undefined symbol: P$APP$_$TC_$__$$_TEST$1 (first seen in app.o)
D12.1CE - OK (apparently, the D12.1CE compiler is generally poor at discarding unused methods (whether this is good or bad)
Logged
Leledumbo
Hero Member
Posts: 8836
Programming + Glam Metal + Tae Kwon Do = Me
Re: Is this an issue? Generic method + {$M+}
«
Reply #1 on:
September 16, 2025, 08:36:08 pm »
I'd say yes, report it. At least that shouldn't be a link time error, maybe a compile time error.
Logged
Follow this if you want me to answer:
http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F
http://pascalgeek.blogspot.com
https://bitbucket.org/leledumbo
https://github.com/leledumbo
Code first, think later - Natural programmer B)
PascalDragon
Hero Member
Posts: 6422
Compiler Developer
Re: Is this an issue? Generic method + {$M+}
«
Reply #2 on:
September 16, 2025, 10:28:13 pm »
Please report.
Logged
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Free Pascal
»
General
(Moderators:
FPK
,
Tomas Hajny
) »
Is this an issue? Generic method + {$M+}
TinyPortal
© 2005-2018