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
Search
Advanced search
Recent
Automatic generation of *...
by
PeterBB
[
Today
at 01:38:51 pm]
Finding List of Fonts & P...
by
J-G
[
Today
at 01:22:49 pm]
Fast Canvas Library V1.05...
by
microxa
[
Today
at 01:11:53 pm]
TyControls: a custom-draw...
by
Antek
[
Today
at 12:07:39 pm]
Star Wars Galaxian
by
paweld
[
Today
at 11:09:28 am]
PO-Editor MyLangEdit3 now...
by
dbannon
[
Today
at 07:55:47 am]
Application triggers mess...
by
JanRoza
[
Today
at 12:26:52 am]
[solved] form reset/reloa...
by
ADMGNS
[August 08, 2026, 09:58:42 pm]
Create small language
by
ADMGNS
[August 08, 2026, 09:52:19 pm]
Advatage Database server
by
neobrasil08
[August 08, 2026, 08:42:18 pm]
QGradientTrackPanel: A Fu...
by
Ed78z
[August 08, 2026, 07:22:09 pm]
How get listy of FieldDat...
by
Aruna
[August 08, 2026, 04:02:16 pm]
Identify network devices
by
LemonParty
[August 08, 2026, 03:44:03 pm]
how to connect to mariadb...
by
Mike.Cornflake
[August 08, 2026, 12:25:31 pm]
New charts
by
Boleeman
[August 08, 2026, 11:24:34 am]
Unleashed Pascal (async/a...
by
Fibonacci
[August 08, 2026, 08:11:20 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Is this an issue? Generic method + {$M+} (Read 665 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: 6417
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